From 08e686a6a6d5bcb5410228b388745d09686b260c Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Fri, 26 Jan 2018 10:08:29 +0900 Subject: [PATCH 1/2] agent: More fix for get_client_pid for portability. * configure.ac: Check sys/ucred.h instead of ucred.h. * agent/command-ssh.c: Include sys/ucred.h. -- It's *BSD and macOS thing. Fixes-commit: f7f806afa5083617f4aba02fc3b285b06a7d73d4 Signed-off-by: NIIBE Yutaka --- agent/command-ssh.c | 4 ++-- configure.ac | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/agent/command-ssh.c b/agent/command-ssh.c index 9d45a1864..213f3f9f7 100644 --- a/agent/command-ssh.c +++ b/agent/command-ssh.c @@ -44,8 +44,8 @@ #include #include #endif /*!HAVE_W32_SYSTEM*/ -#ifdef HAVE_UCRED_H -#include +#ifdef HAVE_SYS_UCRED_H +#include #endif #include "agent.h" diff --git a/configure.ac b/configure.ac index c3fce317d..424ce7be1 100644 --- a/configure.ac +++ b/configure.ac @@ -1278,7 +1278,7 @@ 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 util.h libutil.h termios.h \ - ucred.h sys/sysmacros.h sys/mkdev.h]) + sys/ucred.h sys/sysmacros.h sys/mkdev.h]) AC_HEADER_TIME From d7207b39b71d1b07c4cddac602f29ec583f6d1ad Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Fri, 26 Jan 2018 10:42:31 +0900 Subject: [PATCH 2/2] agent: Fix last commit. * configure.ac: Check ucred.h as well as sys/ucred.h. * agent/command-ssh.c: Add inclusion of ucred.h. -- It was T2981, adding ucred.h for Solaris. We also need sys/ucred.h for FreeBSD and macOS. Signed-off-by: NIIBE Yutaka --- agent/command-ssh.c | 3 +++ configure.ac | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/agent/command-ssh.c b/agent/command-ssh.c index 213f3f9f7..e0b723839 100644 --- a/agent/command-ssh.c +++ b/agent/command-ssh.c @@ -47,6 +47,9 @@ #ifdef HAVE_SYS_UCRED_H #include #endif +#ifdef HAVE_UCRED_H +#include +#endif #include "agent.h" diff --git a/configure.ac b/configure.ac index 424ce7be1..420af92f9 100644 --- a/configure.ac +++ b/configure.ac @@ -1278,7 +1278,7 @@ 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 util.h libutil.h termios.h \ - sys/ucred.h sys/sysmacros.h sys/mkdev.h]) + ucred.h sys/ucred.h sys/sysmacros.h sys/mkdev.h]) AC_HEADER_TIME