Commit 3f3f66de authored by Brad Smith's avatar Brad Smith Committed by Matthieu Herrb

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>
parent 11ee0ae9
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment