Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+2-1
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)