summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Smith <brad@comstyle.com>2008-07-14 22:20:41 +0200
committerMatthieu Herrb <matthieu@bluenote.herrb.net>2008-07-14 22:20:41 +0200
commit3f3f66de669caf3606eec8c5f8d405a283cbf12d (patch)
tree50d972b3837d7f10121ba0da2a51690faf91ee2e
parent11ee0ae9390a608a232ff94abcc0cbcf9ed7b70a (diff)
Fix the configure tests for swap16/__swap16 macros on OpenBSD.
BSD systems need <sys/types.h> included before <sys/endian.h> for macros to work. <https://bugs.freedesktop.org/show_bug.cgi?id=16531>
-rw-r--r--configure.ac2
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index fed80371c..a90848c90 100644
--- a/configure.ac
+++ b/configure.ac
@@ -127,6 +127,7 @@ AC_CHECK_HEADER([sys/endian.h], [HAVE_SYS_ENDIAN_H="yes"], [HAVE_SYS_ENDIAN_H="n
if test "x$HAVE_SYS_ENDIAN_H" = "xyes" ; then
AC_MSG_CHECKING([for __swap16 variant of <sys/endian.h> byteswapping macros])
AC_LINK_IFELSE([AC_LANG_PROGRAM([
+#include <sys/types.h>
#include <sys/endian.h>
], [
int a = 1, b;
@@ -137,6 +138,7 @@ b = __swap16(a);
AC_MSG_CHECKING([for bswap16 variant of <sys/endian.h> byteswapping macros])
AC_LINK_IFELSE([AC_LANG_PROGRAM([
+#include <sys/types.h>
#include <sys/endian.h>
], [
int a = 1, b;