 ea134caa08
			
		
	
	
		ea134caa08
		
	
	
	
	
		
			
			Since commit 83ee768d6247b, we now have two places that define the QJSON type: $ git grep 'typedef struct QJSON QJSON' include/migration/vmstate.h:typedef struct QJSON QJSON; migration/qjson.h:typedef struct QJSON QJSON; This breaks docker-test-build@centos6: In file included from /tmp/qemu-test/src/migration/savevm.c:59: /tmp/qemu-test/src/migration/qjson.h:16: error: redefinition of typedef 'QJSON' /tmp/qemu-test/src/include/migration/vmstate.h:30: note: previous declaration of 'QJSON' was here make: *** [migration/savevm.o] Error 1 This happens because CentOS 6 has an old GCC 4.4.7. Even if redefining a typedef with the same type is permitted since GCC 4.6, unless -pedantic is passed, we don't really need to do that on purpose. Let's have a single definition in <qemu/typedefs.h> instead. Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <152844714981.11789.3657734445739553287.stgit@bahia.lan> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
		
			
				
	
	
		
			28 lines
		
	
	
		
			759 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			759 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /*
 | |
|  * QEMU JSON writer
 | |
|  *
 | |
|  * Copyright Alexander Graf
 | |
|  *
 | |
|  * Authors:
 | |
|  *  Alexander Graf <agraf@suse.de>
 | |
|  *
 | |
|  * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
 | |
|  * See the COPYING.LIB file in the top-level directory.
 | |
|  *
 | |
|  */
 | |
| #ifndef QEMU_QJSON_H
 | |
| #define QEMU_QJSON_H
 | |
| 
 | |
| QJSON *qjson_new(void);
 | |
| void qjson_destroy(QJSON *json);
 | |
| void json_prop_str(QJSON *json, const char *name, const char *str);
 | |
| void json_prop_int(QJSON *json, const char *name, int64_t val);
 | |
| void json_end_array(QJSON *json);
 | |
| void json_start_array(QJSON *json, const char *name);
 | |
| void json_end_object(QJSON *json);
 | |
| void json_start_object(QJSON *json, const char *name);
 | |
| const char *qjson_get_str(QJSON *json);
 | |
| void qjson_finish(QJSON *json);
 | |
| 
 | |
| #endif /* QEMU_QJSON_H */
 |