From 573112ee8695ee0d7c5134c26a23024c04872a75 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 24 Apr 2017 13:28:14 -0700 Subject: endian.h: can be called sys/endian.h or machine/endian.h On some platforms, endian.h may exist but be called sys/endian.h or machine/endian.h. Signed-off-by: H. Peter Anvin --- configure.ac | 2 +- include/compiler.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 26f61f43..8db7c726 100644 --- a/configure.ac +++ b/configure.ac @@ -88,7 +88,7 @@ AC_CHECK_HEADERS(stdnoreturn.h) AC_CHECK_HEADERS(io.h) AC_CHECK_HEADERS(fcntl.h) AC_CHECK_HEADERS(unistd.h) -AC_CHECK_HEADERS(endian.h) +AC_CHECK_HEADERS(endian.h sys/endian.h machine/endian.h) AC_CHECK_HEADERS(sys/mman.h) AC_CHECK_HEADERS(sys/types.h) AC_CHECK_HEADERS(sys/stat.h) diff --git a/include/compiler.h b/include/compiler.h index c068b72d..47d8595b 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -86,8 +86,13 @@ #ifdef HAVE_SYS_TYPES_H # include #endif + #ifdef HAVE_ENDIAN_H # include +#elif defined(HAVE_SYS_ENDIAN_H) +# include +#elif defined(HAVE_MACHINE_ENDIAN_H) +# include #endif /* -- cgit v1.2.1