Check if we HAVE_ENDIAN_H

BSDs will have <sys/endian.h>, Linux just <endian.h>
This commit is contained in:
Marcin Cieślak 2020-04-03 01:23:57 +02:00 committed by Frank Morgner
parent 7840804762
commit 768bd1dde7
2 changed files with 7 additions and 1 deletions

View File

@ -400,7 +400,8 @@ AC_HEADER_ASSERT
AC_CHECK_HEADERS([ \ AC_CHECK_HEADERS([ \
errno.h fcntl.h stdlib.h \ errno.h fcntl.h stdlib.h \
inttypes.h string.h strings.h \ inttypes.h string.h strings.h \
sys/time.h unistd.h sys/mman.h sys/time.h unistd.h sys/mman.h \
sys/endian.h endian.h
]) ])
dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for typedefs, structures, and compiler characteristics.

View File

@ -40,8 +40,13 @@
#ifndef _BSD_SOURCE #ifndef _BSD_SOURCE
#define _BSD_SOURCE /* See feature_test_macros(7) */ #define _BSD_SOURCE /* See feature_test_macros(7) */
#endif #endif
#ifdef HAVE_SYS_ENDIAN_H
#include <sys/endian.h>
#endif
#ifdef HAVE_ENDIAN_H
#include <endian.h> #include <endian.h>
#endif #endif
#endif
int get_pace_capabilities(u8 *bitmap) int get_pace_capabilities(u8 *bitmap)
{ {