aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-11-11 10:36:39 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2021-11-11 10:36:39 -0500
commit01ec41a5fe4aa590dde18a2c551432aa1925caea (patch)
treefb619d48607844d7fc4b2d14c1534a7f57a7951e /src
parent0726c764bc4ec337a0216a546ce41c758d81600d (diff)
downloadpostgresql-01ec41a5fe4aa590dde18a2c551432aa1925caea.tar.gz
postgresql-01ec41a5fe4aa590dde18a2c551432aa1925caea.zip
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 ee3a1a5b6. Discussion: https://postgr.es/m/1440792.1636558888@sss.pgh.pa.us
Diffstat (limited to 'src')
-rw-r--r--src/include/port.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/port.h b/src/include/port.h
index ae68d9c3c79..49b4d38131b 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -37,8 +37,9 @@ typedef SOCKET pgsocket;
#define PGINVALID_SOCKET INVALID_SOCKET
#endif
+/* if platform lacks socklen_t, we assume this will work */
#ifndef HAVE_SOCKLEN_T
-typedef int socklen_t;
+typedef unsigned int socklen_t;
#endif
/* non-blocking */