From 9c35c0de65e135e621400958f22829c0d2555ed4 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Wed, 18 Jun 2025 16:08:34 -0600 Subject: [PATCH] Add HAVE_GETPID to options.h if getpid detected, needed for apps to correctly detect size of WC_RNG struct --- configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configure.ac b/configure.ac index 6fa30f140..86e0d543a 100644 --- a/configure.ac +++ b/configure.ac @@ -160,6 +160,9 @@ fi #ifdef HAVE_STDLIB_H #include #endif +#ifdef HAVE_UNISTD_H + #include +#endif #ifdef HAVE_CTYPE_H #include #endif @@ -10469,6 +10472,12 @@ then AM_CFLAGS="$AM_CFLAGS -DHAVE___UINT128_T=1" fi +# Add HAVE_GETPID to AM_CFLAGS for inclusion in options.h +if test "$ac_cv_func_getpid" = "yes" +then + AM_CFLAGS="$AM_CFLAGS -DHAVE_GETPID=1" +fi + LIB_SOCKET_NSL AX_HARDEN_CC_COMPILER_FLAGS