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>
This commit is contained in:
parent
11ee0ae939
commit
3f3f66de66
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user