aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-07-17 16:54:54 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2023-07-17 16:54:54 -0400
commitefe8d8226929137f8c96f45e0904868b53ba56bc (patch)
tree84212aa59a8c9b451868ea1870848eee006ee1e2 /src
parent4a7301c7ad1c504c5a3f485a1d28cfd62b3ecbb0 (diff)
downloadpostgresql-efe8d8226929137f8c96f45e0904868b53ba56bc.tar.gz
postgresql-efe8d8226929137f8c96f45e0904868b53ba56bc.zip
Include <limits.h> in fe-auth.c, to get CHAR_BIT reliably.
fe-auth.c references CHAR_BIT since commit 3a465cc67, but it did not #include <limits.h>, which per POSIX is where that symbol is defined. This escaped notice so far because (a) on most platforms, <sys/param.h> pulls in <limits.h>, (b) even if yours doesn't, OpenSSL pulls it in, so compiling with --with-openssl masks the omission. Per bug #18026 from Marcel Hofstetter. Back-patch to v16. Discussion: https://postgr.es/m/18026-d5bb69f79cd16203@postgresql.org
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/libpq/fe-auth.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c
index 88fd0f3d802..12c6cd2f23a 100644
--- a/src/interfaces/libpq/fe-auth.c
+++ b/src/interfaces/libpq/fe-auth.c
@@ -27,6 +27,7 @@
#else
#include <unistd.h>
#include <fcntl.h>
+#include <limits.h>
#include <sys/param.h> /* for MAXHOSTNAMELEN on most */
#include <sys/socket.h>
#ifdef HAVE_SYS_UCRED_H