[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH RFC 18/23] libxl: only include utmp.h if it's present
Add a configure check for utmp.h presence, and gate the usage of utmp.h in libxl to the result of the test. Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx> Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx> --- tools/config.h.in | 3 +++ tools/configure.ac | 2 +- tools/libxl/libxl_bootloader.c | 2 ++ 3 files changed, 6 insertions(+), 1 deletions(-) diff --git a/tools/config.h.in b/tools/config.h.in index 709a51d..842e766 100644 --- a/tools/config.h.in +++ b/tools/config.h.in @@ -60,6 +60,9 @@ /* Define to 1 if you have the <asm/unaligned.h> header file. */ #undef HAVE_ASM_UNALIGNED_H +/* Define to 1 if you have the <utmp.h> header file. */ +#undef HAVE_UTMP_H + /* Define curses header to use */ #undef INCLUDE_CURSES_H diff --git a/tools/configure.ac b/tools/configure.ac index cf30254..2a4a729 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 endian.h sys/endian.h asm/unaligned.h]) +AC_CHECK_HEADERS([yajl/yajl_version.h sys/eventfd.h endian.h sys/endian.h asm/unaligned.h utmp.h]) AC_OUTPUT() diff --git a/tools/libxl/libxl_bootloader.c b/tools/libxl/libxl_bootloader.c index 3287bf7..c3ec782 100644 --- a/tools/libxl/libxl_bootloader.c +++ b/tools/libxl/libxl_bootloader.c @@ -15,7 +15,9 @@ #include "libxl_osdeps.h" /* must come before any other headers */ #include <termios.h> +#ifdef HAVE_UTMP_H #include <utmp.h> +#endif #ifdef INCLUDE_LIBUTIL_H #include INCLUDE_LIBUTIL_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 |