Include <limits.h> in fe-auth.c, to get CHAR_BIT reliably.
Tom Lane <tgl@sss.pgh.pa.us>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/interfaces/libpq/fe-auth.c | modified | +1 −0 |
Discussion
- BUG #18026: compile error / fe-auth.c:807:64: error: 'CHAR_BIT' undeclared (first use in this function) 7 messages · 2023-07-17 → 2023-07-18