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.
This commit is contained in:
Darren Tucker 2020-02-17 22:48:50 +11:00
parent 8aa3455b16
commit d4860ec4ef
2 changed files with 3 additions and 2 deletions

View File

@ -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], , ,

View File

@ -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