[Pkg-gnupg-commit] [gnupg2] 26/124: tools: More portable for openpty use.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Apr 5 15:55:29 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit ce37ada87139ef418401f9f35439007a8c04a856
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Tue Mar 7 10:29:37 2017 +0900
tools: More portable for openpty use.
* configure.ac (AC_CHECK_HEADERS): Add util.h libutil.h and termios.h.
* tools/symcryptrun.c: Include those headers.
--
This is for OpenBSD and FreeBSD.
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
---
configure.ac | 3 ++-
tools/symcryptrun.c | 12 ++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index bec7428..5fc2b85 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1274,7 +1274,8 @@ AC_MSG_NOTICE([checking for header files])
AC_HEADER_STDC
AC_CHECK_HEADERS([string.h unistd.h langinfo.h termio.h locale.h getopt.h \
pty.h utmp.h pwd.h inttypes.h signal.h sys/select.h \
- stdint.h signal.h])
+ stdint.h signal.h util.h libutil.h termios.h])
+
AC_HEADER_TIME
diff --git a/tools/symcryptrun.c b/tools/symcryptrun.c
index a72b9cf..b32d43a 100644
--- a/tools/symcryptrun.c
+++ b/tools/symcryptrun.c
@@ -71,9 +71,21 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
+
#ifdef HAVE_PTY_H
#include <pty.h>
+#else
+#ifdef HAVE_TERMIOS_H
+#include <termios.h>
+#endif
+#ifdef HAVE_UTIL_H
+#include <util.h>
+#endif
+#ifdef HAVE_LIBUTIL_H
+#include <libutil.h>
#endif
+#endif
+
#ifdef HAVE_UTMP_H
#include <utmp.h>
#endif
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list