windows: Compile with -mno-ms-bitfields if option not set explicitly

-mms-bitfields is the default in newer MinGWs, but it breaks
__attribute__((packed)).
This commit is contained in:
Martin Willi 2014-06-03 11:06:50 +02:00
parent 0ca8541564
commit 3b7b806d27
1 changed files with 5 additions and 0 deletions

View File

@ -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])