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:46:43 +0000 (12:46 +0900)
commita2eb5c02b42830ad61c1247128807c4726a89394
tree7fcdd00d8569d42ec404cbb5d9a1570955e041e0
parentebdb85a49d6471e3c8108bbe75c6c1b07c43d498
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