From 627cadaa39bcbdc7312ade340acb4ca0c283d2bf Mon Sep 17 00:00:00 2001 From: Zdenek Styblik Date: Mon, 8 Apr 2013 17:29:24 +0000 Subject: [PATCH] ID: 3608759 - Fix bug in configure.in when cross compiling The previous test to see if we need pragma pack(1) was failing if we cross compile because there was no way to run the test. We now use AC_TRY_COMPILE and add the pragma pack(1) to the test code. If it compiles, it must be good, so add the define. Commit for Dan Gora --- ipmitool/configure.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ipmitool/configure.in b/ipmitool/configure.in index 0708795..709f0a1 100644 --- a/ipmitool/configure.in +++ b/ipmitool/configure.in @@ -513,7 +513,7 @@ if test "x$xenable_file_security" != "xno"; then fi -AC_TRY_RUN([ +AC_TRY_COMPILE([],[ #include struct packstruct { @@ -532,7 +532,9 @@ AC_TRY_RUN([ else return(0); } - ],[],[AC_DEFINE(HAVE_PRAGMA_PACK,[1], + ], + [], + [AC_DEFINE(HAVE_PRAGMA_PACK,[1], [Define to 1 if you need to use #pragma pack instead of __attribute__ ((packed))])] )