From d9b934323ae271a9a7602c5df55fc01e6a2a9a9f Mon Sep 17 00:00:00 2001 From: Lealem Amedie Date: Thu, 12 Feb 2026 10:38:07 -0700 Subject: [PATCH] Check if _POSIX_C_SOURCE is defined --- wolfcrypt/src/wolfentropy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/src/wolfentropy.c b/wolfcrypt/src/wolfentropy.c index 4c2bfaec0b..3c9ae799de 100644 --- a/wolfcrypt/src/wolfentropy.c +++ b/wolfcrypt/src/wolfentropy.c @@ -131,7 +131,8 @@ static WC_INLINE word64 Entropy_TimeHiRes(void) return cnt; } -#elif !defined(ENTROPY_MEMUSE_THREAD) && (_POSIX_C_SOURCE >= 199309L) +#elif !defined(ENTROPY_MEMUSE_THREAD) && defined(_POSIX_C_SOURCE) && \ + (_POSIX_C_SOURCE >= 199309L) /* Get the high resolution time counter. * * @return 64-bit time that is the nanoseconds of current time.