BUG #2205: Compilation error on Tru64: socklen_t in pqcomm.c

Started by A Gattikerabout 20 years ago2 messagesbugs
Jump to latest
#1A Gattiker
agattik@gmail.com

The following bug has been logged online:

Bug reference: 2205
Logged by:
Email address: agattik@gmail.com
PostgreSQL version: 8.1.2
Operating system: alphaev68-dec-osf5.1a
Description: Compilation error on Tru64: socklen_t in pqcomm.c
Details:

pqcomm.c: In function `pq_getkeepalivesidle':
pqcomm.c:1186: `socklen_t' undeclared (first use in this function)
pqcomm.c:1186: (Each undeclared identifier is reported only once
pqcomm.c:1186: for each function it appears in.)
pqcomm.c:1186: parse error before "size"
pqcomm.c:1190: `size' undeclared (first use in this function)
pqcomm.c: In function `pq_getkeepalivesinterval':
pqcomm.c:1258: `socklen_t' undeclared (first use in this function)
pqcomm.c:1258: parse error before "size"
pqcomm.c:1262: `size' undeclared (first use in this function)
pqcomm.c: In function `pq_getkeepalivescount':
pqcomm.c:1330: `socklen_t' undeclared (first use in this function)
pqcomm.c:1330: parse error before "size"

/usr/include/sys/socket.h contains:

/*
* This data type is needed for both UNIX98 and POSIX support.
*/
#if (defined (_XOPEN_SOURCE) && (_XOPEN_SOURCE>=500)) || \
defined(_POSIX_PII_SOCKET)
typedef unsigned long socklen_t; /* 64-bits */
#endif

No ./configure options given except --prefix.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: A Gattiker (#1)
Re: BUG #2205: Compilation error on Tru64: socklen_t in pqcomm.c

"" <agattik@gmail.com> writes:

pqcomm.c: In function `pq_getkeepalivesidle':
pqcomm.c:1186: `socklen_t' undeclared (first use in this function)
pqcomm.c:1186: (Each undeclared identifier is reported only once
pqcomm.c:1186: for each function it appears in.)

Thanks for the report. socklen_t should be ACCEPT_TYPE_ARG3 here :-(

regards, tom lane