[openssh-commits] [openssh] 01/05: Check if getpeereid is actually declared.
git+noreply at mindrot.org
git+noreply at mindrot.org
Mon Feb 17 22:56:53 AEDT 2020
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit d4860ec4efd25ba194337082736797fce0bda016
Author: Darren Tucker <dtucker at dtucker.net>
Date: Mon Feb 17 22:48:50 2020 +1100
Check if getpeereid is actually declared.
Check in sys/socket.h (AIX) and unistd.h (FreeBSD, DragonFLy and OS X).
Prevents undeclared function warning on at least some versions of AIX.
---
configure.ac | 3 ++-
openbsd-compat/openbsd-compat.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index b689db4b..7094d470 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1986,10 +1986,11 @@ AC_CHECK_DECL([tcsendbreak],
AC_CHECK_DECLS([h_errno], , ,[#include <netdb.h>])
-AC_CHECK_DECLS([SHUT_RD], , ,
+AC_CHECK_DECLS([SHUT_RD, getpeereid], , ,
[
#include <sys/types.h>
#include <sys/socket.h>
+#include <unistd.h>
])
AC_CHECK_DECLS([O_NONBLOCK], , ,
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
index 4a16702e..e5fd6f5b 100644
--- a/openbsd-compat/openbsd-compat.h
+++ b/openbsd-compat/openbsd-compat.h
@@ -197,7 +197,7 @@ int writev(int, struct iovec *, int);
#include "bsd-waitpid.h"
#include "bsd-poll.h"
-#ifndef HAVE_GETPEEREID
+#if defined(HAVE_DECL_GETPEEREID) && HAVE_DECL_GETPEEREID == 0
int getpeereid(int , uid_t *, gid_t *);
#endif
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list