mirror of
https://github.com/postgres/postgres.git
synced 2025-07-15 19:21:59 +03:00
Create typedef pgsocket for storing socket descriptors.
This silences some warnings on Win64. Not using the proper SOCKET datatype was actually wrong on Win32 as well, but didn't cause any warnings there. Also create define PGINVALID_SOCKET to indicate an invalid/non-existing socket, instead of using a hardcoded -1 value.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/libpq/ip.c,v 1.49 2010/01/02 16:57:45 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/libpq/ip.c,v 1.50 2010/01/10 14:16:07 mha Exp $
|
||||
*
|
||||
* This file and the IPV6 implementation were initially provided by
|
||||
* Nigel Kukard <nkukard@lbsd.net>, Linux Based Systems Design
|
||||
@ -656,9 +656,9 @@ pg_foreach_ifaddr(PgIfAddrCallback callback, void *cb_data)
|
||||
struct sockaddr *addr, *mask;
|
||||
char *ptr, *buffer = NULL;
|
||||
size_t n_buffer = 1024;
|
||||
int sock, fd;
|
||||
pgsocket sock, fd;
|
||||
#ifdef HAVE_IPV6
|
||||
int sock6;
|
||||
pgsocket sock6;
|
||||
#endif
|
||||
int i, total;
|
||||
|
||||
|
Reference in New Issue
Block a user