[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH RFC 08/23] configure: add checks for endian.h and sys/endian.h
In order to know which one to include when building xc_dom_decompress_lz4.c Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx> Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx> --- Please run autoconf after applying this patch. --- tools/config.h.in | 6 ++++++ tools/configure.ac | 2 +- tools/libxc/Makefile | 1 + tools/libxc/xc_dom_decompress_lz4.c | 4 ++++ 4 files changed, 12 insertions(+), 1 deletions(-) diff --git a/tools/config.h.in b/tools/config.h.in index 015f2a1..283cee7 100644 --- a/tools/config.h.in +++ b/tools/config.h.in @@ -51,6 +51,12 @@ /* Define to 1 if you have the <yajl/yajl_version.h> header file. */ #undef HAVE_YAJL_YAJL_VERSION_H +/* Define to 1 if you have the <endian.h> header file. */ +#undef HAVE_ENDIAN_H + +/* Define to 1 if you have the <sys/endian.h> header file. */ +#undef HAVE_SYS_ENDIAN_H + /* Define curses header to use */ #undef INCLUDE_CURSES_H diff --git a/tools/configure.ac b/tools/configure.ac index eb54098..3b8db0a 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -247,7 +247,7 @@ AC_CHECK_LIB([fdt], [fdt_create], [], [AC_MSG_ERROR([Could not find libfdt])]) esac # Checks for header files. -AC_CHECK_HEADERS([yajl/yajl_version.h sys/eventfd.h]) +AC_CHECK_HEADERS([yajl/yajl_version.h sys/eventfd.h endian.h sys/endian.h]) AC_OUTPUT() diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile index 7f9b672..3e3678f 100644 --- a/tools/libxc/Makefile +++ b/tools/libxc/Makefile @@ -90,6 +90,7 @@ OSDEP_SRCS-y += xenctrl_osdep_ENOSYS.c CFLAGS += -Werror -Wmissing-prototypes CFLAGS += -I. $(CFLAGS_xeninclude) +CFLAGS += -include $(XEN_ROOT)/tools/config.h # Needed for posix_fadvise64() in xc_linux.c CFLAGS-$(CONFIG_Linux) += -D_GNU_SOURCE diff --git a/tools/libxc/xc_dom_decompress_lz4.c b/tools/libxc/xc_dom_decompress_lz4.c index 08272fe..7f97364 100644 --- a/tools/libxc/xc_dom_decompress_lz4.c +++ b/tools/libxc/xc_dom_decompress_lz4.c @@ -1,7 +1,11 @@ #include <stdio.h> #include <stdlib.h> #include <inttypes.h> +#if defined(HAVE_ENDIAN_H) #include <endian.h> +#elif defined(HAVE_SYS_ENDIAN_H) +#include <sys/endian.h> +#endif #include <stdint.h> #include "xg_private.h" -- 1.7.7.5 (Apple Git-26) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |