Skip to contentSkip to conversation

Fix builind error for old gcc

PATCH In review Wen Congyang 3 participants 3 messages Jul 11, 2014

lore
Share & tools
lore
#0 lore raw

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
index e6e0301..5ae6532 100644
@@ -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
#1 lore raw

(There's typo in subject line)

CC'ing Ian

Quoted 16 lines · Wen Congyang

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 -0
index e6e0301..5ae6532 100644

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 -0
 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 · 1 line
1.9.3

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#2 lore raw
Quoted 1 line · Wei Liu

(There's typo in subject line)

I rewrote the commit log a bit and applied, thanks.

Ian.