[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] blktap2: use HAVE_BYTESWAP_H and _BYTESWAP_H for uclibc compatibility
# HG changeset patch # User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx> # Date 1323969492 -3600 # Node ID a01f1e2f654ea54bbf5d0a77b315b676cc494aa8 # Parent 0051e09f73efea06f2f28c0ece57194e286daedc blktap2: use HAVE_BYTESWAP_H and _BYTESWAP_H for uclibc compatibility uclibc defines _BYTESWAP_H instead of HAVE_BYTESWAP_H in byteswap.h: http://git.uclibc.org/uClibc/tree/include/byteswap.h Without this fix, blktap2 doesn't compile under uclibc and throws the following 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 .block-qcow.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -Werror -g -O0 -Wno-unused -fno-strict-aliasing -I../include -I../drivers -I/root/xen-unstable/tools/blktap2/drivers/../../../tools/libxc -I/root/xen-unstable/tools/blktap2/drivers/../../../tools/include -I /root/xen-unstable/tools/blktap2/drivers/../../../tools/memshr -D_GNU_SOURCE -DUSE_NFS_LOCKS -fPIC -I /root/xen-unstable/tools/blktap2/drivers/../../../tools/libaio/src -c -o block-qcow.o block-qcow.c -I/usr/local/include In file included from block-qcow.c:37:0: bswap.h:23:0: error: "bswap_16" redefined [-Werror] /usr/include/byteswap.h:30:0: note: this is the location of the previous definition bswap.h:31:0: error: "bswap_32" redefined [-Werror] /usr/include/byteswap.h:33:0: note: this is the location of the previous definition bswap.h:41:0: error: "bswap_64" redefined [-Werror] /usr/include/byteswap.h:37:0: note: this is the location of the previous definition cc1: all warnings being treated as errors Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx> diff -r 0051e09f73ef -r a01f1e2f654e tools/blktap2/drivers/bswap.h --- a/tools/blktap2/drivers/bswap.h Thu Dec 15 10:00:09 2011 +0100 +++ b/tools/blktap2/drivers/bswap.h Thu Dec 15 18:18:12 2011 +0100 @@ -15,7 +15,7 @@ #define bswap_64(x) swap64(x) #else -#ifdef HAVE_BYTESWAP_H +#if defined(HAVE_BYTESWAP_H) || defined(_BYTESWAP_H) #include <byteswap.h> #else _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |