diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2019-12-16 11:48:01 +0100 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2019-12-16 11:48:01 +0100 |
commit | 502423180a8cc9214861bffcb8405a42f146f160 (patch) | |
tree | 505f02c8ad8dbba0aa9db750cee755e14ea9ac35 | |
parent | f14413b684d57211068ee56ee04695efcc87a23a (diff) | |
download | postgresql-502423180a8cc9214861bffcb8405a42f146f160.tar.gz postgresql-502423180a8cc9214861bffcb8405a42f146f160.zip |
Fix build of Perl-using modules of Windows
Commit f14413b684d57211068ee56ee04695efcc87a23a broke the build of
Perl-using modules on Windows.
Perl might have its own definitions of uid_t and gid_t, so we hide
ours, but then we can't use ours in our header files such as port.h
which don't see the Perl definition.
Hide our definition of getpeereid() on Windows in Perl-using modules,
using PLPERL_HAVE_UID_GID define. That means we can't portably use
getpeeruid() is such modules right now, but there is no need anyway.
-rw-r--r-- | src/include/port.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/port.h b/src/include/port.h index 9567590581b..aec5281e43b 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -355,8 +355,11 @@ extern int fls(int mask); #endif #ifndef HAVE_GETPEEREID +/* On Windows, Perl might have incompatible definitions of uid_t and gid_t. */ +#ifndef PLPERL_HAVE_UID_GID extern int getpeereid(int sock, uid_t *uid, gid_t *gid); #endif +#endif #ifndef HAVE_ISINF extern int isinf(double x); |