Skip to content

Commit 0b4a086

Browse files
committed
Portability fixes for Solaris for requirepeer feature patch
per report from Dave Page
1 parent cf5305f commit 0b4a086

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/interfaces/libpq/fe-connect.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.402 2010/07/18 17:08:11 tgl Exp $
11+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.403 2010/07/19 18:53:25 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -21,6 +21,9 @@
2121
#include <ctype.h>
2222
#include <time.h>
2323
#include <unistd.h>
24+
#ifdef HAVE_UCRED_H
25+
#include <ucred.h>
26+
#endif
2427

2528
#include "libpq-fe.h"
2629
#include "libpq-int.h"
@@ -1789,7 +1792,7 @@ PQconnectPoll(PGconn *conn)
17891792
ucred_t *ucred;
17901793

17911794
ucred = NULL; /* must be initialized to NULL */
1792-
if (getpeerucred(sock, &ucred) == -1)
1795+
if (getpeerucred(conn->sock, &ucred) == -1)
17931796
{
17941797
appendPQExpBuffer(&conn->errorMessage,
17951798
libpq_gettext("could not get peer credentials: %s\n"),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy