# HG changeset patch # User Matt Johnston # Date 1385393401 -28800 # Node ID 39d872718d4b67364a8230c4905f5fcaac2c077a # Parent 30ab30e46452e9753dc9d63c31749ba2828c2663 Try and fix utmp handling diff -r 30ab30e46452 -r 39d872718d4b configure.ac --- a/configure.ac Mon Nov 25 23:08:33 2013 +0800 +++ b/configure.ac Mon Nov 25 23:30:01 2013 +0800 @@ -540,7 +540,9 @@ AC_MSG_CHECKING([if your system defines WTMP_FILE]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include -#include +#ifdef HAVE_UTMP_H +# include +#endif #ifdef HAVE_PATHS_H # include #endif @@ -598,9 +600,11 @@ AC_MSG_CHECKING([if your system defines WTMPX_FILE]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include -#include +#ifdef HAVE_UTMP_H +# include +#endif #ifdef HAVE_UTMPX_H -#include +# include #endif #ifdef HAVE_PATHS_H # include diff -r 30ab30e46452 -r 39d872718d4b loginrec.h --- a/loginrec.h Mon Nov 25 23:08:33 2013 +0800 +++ b/loginrec.h Mon Nov 25 23:30:01 2013 +0800 @@ -73,16 +73,16 @@ #else /* Simply select your favourite login types. */ /* Can't do if-else because some systems use several... */ -# if defined(UTMPX_FILE) && !defined(DISABLE_UTMPX) +# if defined(HAVE_UTMPX_H) && defined(UTMPX_FILE) && !defined(DISABLE_UTMPX) # define USE_UTMPX # endif -# if defined(UTMP_FILE) && !defined(DISABLE_UTMP) +# if defined(HAVE_UTMP_H) && defined(UTMP_FILE) && !defined(DISABLE_UTMP) # define USE_UTMP # endif -# if defined(WTMPX_FILE) && !defined(DISABLE_WTMPX) +# if defined(HAVE_WTMPX_H) && defined(WTMPX_FILE) && !defined(DISABLE_WTMPX) # define USE_WTMPX # endif -# if defined(WTMP_FILE) && !defined(DISABLE_WTMP) +# if defined(HAVE_WTMP_H) && defined(WTMP_FILE) && !defined(DISABLE_WTMP) # define USE_WTMP # endif