Fix portability to OpenBSD.
authorTatsuo Ishii <ishii@postgresql.org>
Mon, 5 May 2025 03:40:56 +0000 (12:40 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Mon, 5 May 2025 03:40:56 +0000 (12:40 +0900)
commit593fb87cb40384e339931d4e1d2f985d3e19e7b4
tree19f819bd49edf5450608617c7e57ffe6c4e9edce
parent5c41d5338710ab89a3c4e5b9466eaea5ae1bb09c
Fix portability to OpenBSD.

- va_list is defined stdarg.h[0]
- pthread_t is defined in pthread.h / sys/types.h[1]
  On OpenBSD sys/types.h doesn't suffice, so include pthread.h.
- LibreSSL has removed HMAC_CTX_init(), and has support for HMAC_CTX_new
  since 2018. I've talked to Theo Buehler of LibreSSL and he said that he'd
  prefer to simply remove the LIBRESSL_VERSION_NUMBER, but if desired by
  upstream the LIBRESSL_VERSION_NUMBER should be 0x2070100fL.
- WIFEXITED is defined in sys/wait.h[2]

Author: Martijn van Duren (pgpool@list.imperialat.at)
Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2025-May/004583.html
Backpatch-through: v4.2
src/include/utils/fe_ports.h
src/include/watchdog/wd_utils.h
src/utils/ssl_utils.c
src/watchdog/wd_escalation.c