From 3b7b806d27024b71506ba3b803fd5b42dd40b745 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Tue, 3 Jun 2014 11:06:50 +0200 Subject: [PATCH] windows: Compile with -mno-ms-bitfields if option not set explicitly -mms-bitfields is the default in newer MinGWs, but it breaks __attribute__((packed)). --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index 20e40327b..d069a168d 100644 --- a/configure.ac +++ b/configure.ac @@ -746,6 +746,11 @@ AC_COMPILE_IFELSE( windows=true openssl_lib=eay32 AC_SUBST(PTHREADLIB, "") + # explicitly disable ms-bitfields, as it breaks __attribute__((packed)) + case "$CFLAGS" in + *ms-bitfields*) ;; + *) CFLAGS="$CFLAGS -mno-ms-bitfields" ;; + esac ], [ AC_MSG_RESULT([no])