summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2017-01-27 10:26:34 +0000
committerPeter Stephenson <pws@zsh.org>2017-01-27 10:26:34 +0000
commit8575e2ba57892b49654ebf3dfa502c90e2b765b5 (patch)
treecd13d3b5ae41b3487a0fe0a783daee92d8cc7d10 /Src
parent1633b2800d3679e3b89a34bcafa03956ed310b61 (diff)
downloadzsh-8575e2ba57892b49654ebf3dfa502c90e2b765b5.tar.gz
zsh-8575e2ba57892b49654ebf3dfa502c90e2b765b5.tar.xz
zsh-8575e2ba57892b49654ebf3dfa502c90e2b765b5.zip
40425: HAVE_* tests for getutxent etc.
Not yet 100% clear where the #if's go, depends on how various
systems implement the old or new formats.
Diffstat (limited to 'Src')
-rw-r--r--Src/watch.c9
1 files changed, 6 insertions, 3 deletions
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