[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxl: only include utmp.h if it's present
commit 8bf33368f682e0e6b41ec7c568296f0028a175d3 Author: Roger Pau Monne <roger.pau@xxxxxxxxxx> AuthorDate: Mon Jun 2 17:08:20 2014 +0200 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Wed Jun 18 17:20:42 2014 +0100 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> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx> [ ijc -- resolved minor conflict in configure.ac and reran autogen ] --- tools/config.h.in | 3 +++ tools/configure | 2 +- tools/configure.ac | 2 +- tools/libxl/libxl_bootloader.c | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/config.h.in b/tools/config.h.in index 1809662..028c360 100644 --- a/tools/config.h.in +++ b/tools/config.h.in @@ -51,6 +51,9 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if you have the <utmp.h> header file. */ +#undef HAVE_UTMP_H + /* Define to 1 if you have the <valgrind/memcheck.h> header file. */ #undef HAVE_VALGRIND_MEMCHECK_H diff --git a/tools/configure b/tools/configure index ea7b4de..c3a6824 100755 --- a/tools/configure +++ b/tools/configure @@ -8070,7 +8070,7 @@ fi esac # Checks for header files. -for ac_header in yajl/yajl_version.h sys/eventfd.h valgrind/memcheck.h +for ac_header in yajl/yajl_version.h sys/eventfd.h valgrind/memcheck.h utmp.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" diff --git a/tools/configure.ac b/tools/configure.ac index d9eab5a..9db798b 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -265,7 +265,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 valgrind/memcheck.h]) +AC_CHECK_HEADERS([yajl/yajl_version.h sys/eventfd.h valgrind/memcheck.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 -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |