[ovs-dev] [PATCH] Broken build on MSVC
Alin Serdean
aserdean at cloudbasesolutions.com
Thu Oct 9 03:00:58 UTC 2014
source='lib/nx-match.c' object='lib/nx-match.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/sh ./build-aux/depcomp \
/bin/sh ./libtool --tag=CC --mode=compile ./build-aux/cccl -DHAVE_CONFIG_H -I. -I ./include/windows -I ./datapath-windows/include -IC:/pthread/include -O2 -I ./include -I ./include -I ./l
ib -I ./lib -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wformat-security -Wno-format-zero-length -Wswitch-enum -Wunused-parameter -Wbad-function-cast -Wcast-align -Wstrict-
prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers -Wthread-safety -fno-strict-aliasing -g -c -o lib/nx-match.lo lib/nx-match.c
libtool: compile: ./build-aux/cccl -DHAVE_CONFIG_H -I. -I ./include/windows -I ./datapath-windows/include -IC:/pthread/include -O2 -I ./include -I ./include -I ./lib -I ./lib -Wstrict-prototypes -Wal
l -Wextra -Wno-sign-compare -Wpointer-arith -Wformat-security -Wno-format-zero-length -Wswitch-enum -Wunused-parameter -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wold-style-definition -Wmis
sing-prototypes -Wmissing-field-initializers -Wthread-safety -fno-strict-aliasing -g -c lib/nx-match.c
cl -nologo -FS -EHsc -DHAVE_CONFIG_H -I. -I ./include/windows -I ./datapath-windows/include -IC:/pthread/include -O2 -I ./include -I ./include -I ./lib -I ./lib -fno-strict-aliasing -Zi -c lib/nx-matc
h.c
cl : Command line warning D9002 : ignoring unknown option '-fno-strict-aliasing'
nx-match.c
lib/nx-match.c(320) : error C2100: illegal indirection
lib/nx-match.c(320) : error C2034: 'build_assert_failed' : type of bit field too small for number of bits
lib/nx-match.c(320) : error C2296: '%' : illegal, left operand has type 'void *'
lib/nx-match.c(320) : error C2198: 'ntohll' : too few arguments for call
make[2]: *** [lib/nx-match.lo] Error 1
make[2]: Leaving directory `/c/temp_october/08_10_2014/temp/4/ovs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/c/temp_october/08_10_2014/temp/4/ovs'
make: *** [all] Error 2
Bypass assertions
Signed-off-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>
---
lib/unaligned.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/unaligned.h b/lib/unaligned.h
index 154eb13..2f16782 100644
--- a/lib/unaligned.h
+++ b/lib/unaligned.h
@@ -157,11 +157,15 @@ static inline void put_unaligned_u64__(uint64_t *p_, uint64_t x_)
* Below, "sizeof (*(P) % 1)" verifies that *P has an integer type, since
* operands to % must be integers.
*/
+#ifndef _WIN32
#define get_unaligned_u64(P) \
(BUILD_ASSERT(sizeof *(P) == 8), \
BUILD_ASSERT_GCCONLY(!TYPE_IS_SIGNED(typeof(*(P)))), \
(void) sizeof (*(P) % 1), \
get_unaligned_u64__((const uint64_t *) (P)))
+#else
+#define get_unaligned_u64(P) get_unaligned_u64__((const uint64_t *) (P))
+#endif
/* Stores 'x' at possibly misaligned address 'p'.
*
--
1.9.4.msysgit.1
More information about the dev
mailing list