From: Willy Tarreau Date: Tue, 5 Aug 2025 13:59:11 +0000 (+0200) Subject: BUILD: compat: always set _POSIX_VERSION to ease comparisons X-Git-Tag: v3.3-dev6~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e921fe894f6b992414e595be9450a9092f4df48e;p=thirdparty%2Fhaproxy.git BUILD: compat: always set _POSIX_VERSION to ease comparisons Sometimes we need to compare it to known versions, let's make sure it's always defined. We set it to zero if undefined so that it cannot match any comparison. --- diff --git a/include/haproxy/compat.h b/include/haproxy/compat.h index ad91b901c..39f7af7a6 100644 --- a/include/haproxy/compat.h +++ b/include/haproxy/compat.h @@ -120,6 +120,11 @@ typedef struct { } empty_t; }) #endif +/* always set a _POSIX_VERSION if there isn't any, in order to ease compares */ +#ifndef _POSIX_VERSION +# define _POSIX_VERSION 0 +#endif + /* this is for libc5 for example */ #ifndef TCP_NODELAY #define TCP_NODELAY 1