[PATCHES] lib/texpect: prefer bsd/libutil.h if available

Stefan (metze) Metzmacher metze at samba.org
Thu Dec 18 03:18:15 MST 2014


Hi Günther,

can you please review and push the following patches.

They avoid a compiler warning on ubuntu 12.04, where libutil.h is
deprecated.

Thanks!
metze
-------------- next part --------------
From 093f8f40127ee1e99119d7db0193bfdc67961f40 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Thu, 18 Dec 2014 02:05:28 +0000
Subject: [PATCH 1/2] s4:heimdal_build: remove unused openpty check

commit 638a8edd7ce708cf550c054ac16dade795b6448b removed
HEIMDAL_BINARY('rkpty', 'lib/roken/rkpty.c',...)
(the only heimdal user of openpty().

Signed-off-by: Stefan Metzmacher <metze at samba.org>
---
 source4/heimdal_build/wscript_configure | 1 -
 1 file changed, 1 deletion(-)

diff --git a/source4/heimdal_build/wscript_configure b/source4/heimdal_build/wscript_configure
index 5b7109e..9a68656 100755
--- a/source4/heimdal_build/wscript_configure
+++ b/source4/heimdal_build/wscript_configure
@@ -64,7 +64,6 @@ conf.CHECK_FUNCS_IN('res_search res_nsearch res_ndestroy dns_search dn_expand',
                     checklibc=True, headers='netinet/in.h arpa/nameser.h resolv.h dns.h')
 conf.CHECK_VARIABLE('_res', headers='netinet/in.h arpa/nameser.h resolv.h')
 conf.CHECK_DECLS('_res', headers='netinet/in.h arpa/nameser.h resolv.h')
-conf.CHECK_FUNCS_IN('openpty', 'util', checklibc=True, headers='pty.h util.h libutil.h')
 
 conf.DEFINE('HAVE_KRB5',1)
 
-- 
1.9.1


From eb961e275e651789e37b574d0b210b18add66971 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Wed, 10 Dec 2014 12:23:04 +0000
Subject: [PATCH 2/2] lib/texpect: prefer bsd/libutil.h if available

---
 lib/texpect/texpect.c | 4 +++-
 lib/texpect/wscript   | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/texpect/texpect.c b/lib/texpect/texpect.c
index d788081..75a32f4 100644
--- a/lib/texpect/texpect.c
+++ b/lib/texpect/texpect.c
@@ -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
 
diff --git a/lib/texpect/wscript b/lib/texpect/wscript
index 4163ca1..62a1d4d 100644
--- a/lib/texpect/wscript
+++ b/lib/texpect/wscript
@@ -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)
-- 
1.9.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20141218/efe07645/attachment.pgp>


More information about the samba-technical mailing list