diff --git a/tools/config.h.in b/tools/config.h.in index 1809662597..028c360207 100644 --- a/tools/config.h.in +++ b/tools/config.h.in @@ -51,6 +51,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if you have the header file. */ +#undef HAVE_UTMP_H + /* Define to 1 if you have the header file. */ #undef HAVE_VALGRIND_MEMCHECK_H diff --git a/tools/configure b/tools/configure index ea7b4de003..c3a6824f55 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 d9eab5a629..9db798b57a 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 3287bf77da..c3ec782c14 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 +#ifdef HAVE_UTMP_H #include +#endif #ifdef INCLUDE_LIBUTIL_H #include INCLUDE_LIBUTIL_H