lib/texpect: prefer bsd/libutil.h if available
authorStefan Metzmacher <metze@samba.org>
Wed, 10 Dec 2014 12:23:04 +0000 (12:23 +0000)
committerGünther Deschner <gd@samba.org>
Thu, 18 Dec 2014 15:31:48 +0000 (16:31 +0100)
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Dec 18 16:31:48 CET 2014 on sn-devel-104

lib/texpect/texpect.c
lib/texpect/wscript

index d78808188bbf0d490af66cbbcd5d210847a4e85f..75a32f4bed29d728e64463315f0c2668c591aaab 100644 (file)
@@ -41,7 +41,9 @@
 #ifdef HAVE_UTIL_H
 #include <util.h>
 #endif
-#ifdef HAVE_LIBUTIL_H
+#ifdef HAVE_BSD_LIBUTIL_H
+#include <bsd/libutil.h>
+#elif defined HAVE_LIBUTIL_H
 #include <libutil.h>
 #endif
 
index 4163ca10bd6e75a6e284542e1b7a742573663601..62a1d4dbb94a57da80ab5defe39e9bf3c9c6e625 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 def configure(conf):
-    conf.CHECK_FUNCS_IN('openpty', 'util', checklibc=True, headers='pty.h util.h libutil.h')
+    conf.CHECK_FUNCS_IN('openpty', 'util', checklibc=True, headers='pty.h util.h bsd/libutil.h libutil.h')
 
 def build(bld):
     bld.SAMBA_BINARY('texpect', 'texpect.c', deps='popt util', install=False)