From: Peter Eisentraut Date: Mon, 19 Jul 2010 18:53:25 +0000 (+0000) Subject: Portability fixes for Solaris for requirepeer feature patch X-Git-Tag: REL9_1_ALPHA1~202 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0b4a0868f92baca61b5db5ea7c5e3c919621db4d;p=postgresql Portability fixes for Solaris for requirepeer feature patch per report from Dave Page --- diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index b2efbdf0e7..39dfc46d8b 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.402 2010/07/18 17:08:11 tgl Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.403 2010/07/19 18:53:25 petere Exp $ * *------------------------------------------------------------------------- */ @@ -21,6 +21,9 @@ #include #include #include +#ifdef HAVE_UCRED_H +#include +#endif #include "libpq-fe.h" #include "libpq-int.h" @@ -1789,7 +1792,7 @@ keep_going: /* We will come back to here until there is ucred_t *ucred; ucred = NULL; /* must be initialized to NULL */ - if (getpeerucred(sock, &ucred) == -1) + if (getpeerucred(conn->sock, &ucred) == -1) { appendPQExpBuffer(&conn->errorMessage, libpq_gettext("could not get peer credentials: %s\n"),