Fix builind error for old gcc
PATCH 1/1 Fix builind error for old gcc
commit de18e4c038306aeeca53e6e63e563036cafef162 introduces a building error:
gcc -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -D__XEN_TOOLS__ -MMD -MF .xl.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -Werror -Wno-format-zero-length -Wmissing-declarations -Wno-declaration-after-statement -Wformat-nonliteral -I. -fPIC -pthread -I/home/wency/src/upstream/xen/tools/libxl/../../tools/libxc -I/home/wency/src/upstream/xen/tools/libxl/../../tools/include -I/home/wency/src/upstream/xen/tools/libxl/../../tools/libxl -I/home/wency/src/upstream/xen/tools/libxl/../../tools/libxc -I/home/wency/src/upstream/xen/tools/libxl/../../tools/include -I/home/wency/src/upstream/xen/tools/libxl/../../tools/include -Wshadow -include /home/wency/src/upstream/xen/tools/libxl/../../tools/config.h -c -o xl.o xl.c
In file included from xl.c:31:
libxl.h:582: error: redefinition of typedef ‘libxl_ctx’ libxl.h:348: note: previous declaration of ‘libxl_ctx’ was here
--- tools/libxl/libxl.h | 2 -- 1 file changed, 2 deletions(-)
tools/libxl/libxl.h +0 -2
@@ -579,8 +579,6 @@ typedef struct libxl__ctx libxl_ctx;*/ #define LIBXL_HAVE_CPUPOOL_NAME 1 -typedef struct libxl__ctx libxl_ctx ; -typedef uint8_t libxl_mac [6 ];#define LIBXL_MAC_FMT "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx"#define LIBXL_MAC_FMTLEN ((2*6)+5)/* 6 hex bytes plus 5 colons */
Signature · 7 lines
1.9.3 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
(There's typo in subject line)
CC'ing Ian
Quoted 16 lines · Wen Congyang
commit
de18e4c038306aeeca53e6e63e563036cafef162introduces a building error:
gcc -O1 -fno-omit-frame-pointer -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -D__XEN_TOOLS__ -MMD -MF .xl.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -Werror -Wno-format-zero-length -Wmissing-declarations -Wno-declaration-after-statement -Wformat-nonliteral -I. -fPIC -pthread -I/home/wency/src/upstream/xen/tools/libxl/../../tools/libxc -I/home/wency/src/upstream/xen/tools/libxl/../../tools/include -I/home/wency/src/upstream/xen/tools/libxl/../../tools/libxl -I/home/wency/src/upstream/xen/tools/libxl/../../tools/libxc -I/home/wency/src/upstream/xen/tools/libxl/../../tools/include -I/home/wency/src/upstream/xen/tools/libxl/../../tools/include -Wshadow -include/home/wency/src/upstream/xen/tools/libxl/../../tools/config.h-c -o xl.oxl.c
In file included from xl.c:31:
libxl.h:582: error: redefinition of typedef ‘libxl_ctx’ libxl.h:348: note: previous declaration of ‘libxl_ctx’ was hereSigned-off-by Wen Congyang <[email protected]>--- tools/libxl/libxl.h | 2 -- 1 file changed, 2 deletions(-)tools/libxl/libxl.h +0
-0
tools/libxl/libxl.h typedef struct libxl__ctx libxl_ctx; · line 583
Quoted 5 lines
tools/libxl/libxl.h +0
-2@@ -579,8 +579,6 @@ typedef struct libxl__ctx libxl_ctx;*/ #define LIBXL_HAVE_CPUPOOL_NAME 1 -typedef struct libxl__ctx libxl_ctx ; -
Sigh, this duplicated definition sneaked in again.
Thanks for fixing this.
Wei.
Quoted 5 lines
tools/libxl/libxl.h +0
-0typedef uint8_t libxl_mac [6 ];#define LIBXL_MAC_FMT "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx"#define LIBXL_MAC_FMTLEN ((2*6)+5)/* 6 hex bytes plus 5 colons */ Signature · 1 line
1.9.3
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 1 line · Wei Liu
(There's typo in subject line)
I rewrote the commit log a bit and applied, thanks.
Ian.