From b2038569d3d1ff4ac17ad20b45a746095db08830 Mon Sep 17 00:00:00 2001 From: Thorsten Otto Date: Wed, 20 Mar 2024 10:28:35 +0100 Subject: [PATCH] Avoid redefinition of __USE_POSIX199309/_POSIX_C_SOURCE On glibc systems, they are already defined in which is pulled in by any system header. Defining such macros in header files is too late. --- common/mssleep.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/mssleep.h b/common/mssleep.h index 9f7c8a66..eb1f8ebc 100644 --- a/common/mssleep.h +++ b/common/mssleep.h @@ -11,8 +11,12 @@ #elif defined(_WIN32) #include #else /* Assuming recent posix*/ -#define __USE_POSIX199309 +#ifndef __USE_POSIX199309 +#define __USE_POSIX199309 1 +#endif +#ifndef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 199309L +#endif #include #endif