summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/watch.c9
-rw-r--r--configure.ac3
3 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 272311ca3..1a23573b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-01-27 Peter Stephenson <p.stephenson@samsung.com>
+
+ * 40425: configure.ac, Src/watch.c: HAVE_* tests for getutxent
+ etc.
+
2017-01-26 Peter Stephenson <p.w.stephenson@ntlworld.com>
* 40423: Src/params.c, Test/E01options.ztst: similar for type
diff --git a/Src/watch.c b/Src/watch.c
index 7a6b930b9..6103ef15f 100644
--- a/Src/watch.c
+++ b/Src/watch.c
@@ -87,9 +87,12 @@
#if !defined(WATCH_STRUCT_UTMP) && defined(HAVE_STRUCT_UTMPX) && defined(REAL_UTMPX_FILE)
# define WATCH_STRUCT_UTMP struct utmpx
-# define setutent setutxent
-# define getutent getutxent
-# define endutent endutxent
+# if defined(HAVE_SETUTXENT) && defined(HAVE_GETUTXENT) && defined(HAVE_ENDUTXENT)
+# define setutent setutxent
+# define getutent getutxent
+# define endutent endutxent
+# endif
+
/*
* In utmpx, the ut_name field is replaced by ut_user.
* Howver, on some systems ut_name may already be defined this
diff --git a/configure.ac b/configure.ac
index dda52bc98..c6ece6709 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1324,7 +1324,8 @@ AC_CHECK_FUNCS(strftime strptime mktime timelocal \
symlink getcwd \
cygwin_conv_path \
nanosleep \
- srand_deterministic)
+ srand_deterministic \
+ setutxent getutxent endutxent)
AC_FUNC_STRCOLL
AH_TEMPLATE([REALPATH_ACCEPTS_NULL],