Skip to content

Commit 01ec41a

Browse files
committed
Fall back to unsigned int, not int, for socklen_t.
It's a coin toss which of these is a better default assumption. However, of the machines we have in the buildfarm, the only ones relying on the fallback socklen_t definition are ancient HPUX, and on that platform unsigned int is the right choice. Minor tweak to ee3a1a5. Discussion: https://postgr.es/m/1440792.1636558888@sss.pgh.pa.us
1 parent 0726c76 commit 01ec41a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/include/port.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ typedef SOCKET pgsocket;
3737
#define PGINVALID_SOCKET INVALID_SOCKET
3838
#endif
3939

40+
/* if platform lacks socklen_t, we assume this will work */
4041
#ifndef HAVE_SOCKLEN_T
41-
typedef int socklen_t;
42+
typedef unsigned int socklen_t;
4243
#endif
4344

4445
/* non-blocking */

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