diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-06-02 13:05:01 -0400 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-06-02 13:05:01 -0400 |
| commit | 3980f7fc6ecb75952ebe76c3d30ec6731728098d (patch) | |
| tree | 6578e3dea9723f39ef28019d299e84103b49f4a9 /src/include/port.h | |
| parent | 0c99d41ec887051fb0cc6e35e358ecc936a13584 (diff) | |
| download | postgresql-3980f7fc6ecb75952ebe76c3d30ec6731728098d.tar.gz | |
Implement getpeereid() as a src/port compatibility function.
This unifies a bunch of ugly #ifdef's in one place. Per discussion,
we only need this where HAVE_UNIX_SOCKETS, so no need to cover Windows.
Marko Kreen, some adjustment by Tom Lane
Diffstat (limited to 'src/include/port.h')
| -rw-r--r-- | src/include/port.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/port.h b/src/include/port.h index 6ea681f16a..d7295e3132 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -395,6 +395,10 @@ extern void srand48(long seed); extern int getopt(int nargc, char *const * nargv, const char *ostr); #endif +#ifndef HAVE_GETPEEREID +extern int getpeereid(int sock, uid_t *uid, gid_t *gid); +#endif + #ifndef HAVE_ISINF extern int isinf(double x); #endif |
