From 512514ca23c70f9f912eff9336853e3120074267 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 3 Feb 2014 16:55:09 +0900 Subject: [PATCH] Limit gcc_struct checking to win32 builds. I guess -Werror isn't used when doing compile checks. --- config.d/typedefs_structs_compiler.m4 | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/config.d/typedefs_structs_compiler.m4 b/config.d/typedefs_structs_compiler.m4 index a25fb7941..a68df83b8 100644 --- a/config.d/typedefs_structs_compiler.m4 +++ b/config.d/typedefs_structs_compiler.m4 @@ -53,15 +53,17 @@ AH_VERBATIM([HAVE___ATTRIBUTE__VISIBILITY], # define VISIBLE #endif]) -AC_MSG_CHECKING(for __attribute__ ((gcc_struct))) -AC_TRY_COMPILE( - [void foo (void); - typedef struct { int foo; } __attribute__ ((gcc_struct)) gcc_struct_test;], - [], - AC_DEFINE(HAVE___ATTRIBUTE__GCC_STRUCT) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) -) +if test "x$SYSTYPE" = "xWIN32"; then + AC_MSG_CHECKING(for __attribute__ ((gcc_struct))) + AC_TRY_COMPILE( + [typedef struct { int foo; } + __attribute__ ((gcc_struct)) gcc_struct_test;], + [], + AC_DEFINE(HAVE___ATTRIBUTE__GCC_STRUCT) + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) + ) +fi AH_VERBATIM([HAVE___ATTRIBUTE__GCC_STRUCT], [/* Define this if the GCC gcc_struct __attribute__ is available */ #undef HAVE___ATTRIBUTE__GCC_STRUCT