From: Olivier Houchard Date: Fri, 2 Oct 2026 18:22:39 +0000 (+0200) Subject: BUILD: sym: Define HA_HAVE_DL_ITERATE_PHDR on FreeBSD X-Git-Tag: v3.5-dev9~211 X-Git-Url: https://git.kaiwu.me/$%7BISSUES%7D/static/gitweb.js?a=commitdiff_plain;h=88576119c7efbda508c5d65c1f418f5fdeb8fd97;p=haproxy.git BUILD: sym: Define HA_HAVE_DL_ITERATE_PHDR on FreeBSD FreeBSD has been providing dl_iterate_phdr() since FreeBSD 7.0, so define HA_HAVE_DL_ITERATE_PHDR and HA_HAVE_DUMP_LIBS there. --- diff --git a/include/haproxy/compat.h b/include/haproxy/compat.h index 2d76ffb49..10fc58bac 100644 --- a/include/haproxy/compat.h +++ b/include/haproxy/compat.h @@ -287,8 +287,10 @@ typedef struct { } empty_t; #endif #endif -/* dl_iterate_phdr() is available in GLIBC 2.2.4 and up. Let's round up to 2.3.x */ -#if defined(USE_DL) && defined(__GNU_LIBRARY__) && (__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) +/* dl_iterate_phdr() is available in FreeBSD 7.0+ and glibc 2.3+. */ +#if defined(__FreeBSD__) || \ + (defined(USE_DL) && defined(__GNU_LIBRARY__) && \ + (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3))) #define HA_HAVE_DL_ITERATE_PHDR #define HA_HAVE_DUMP_LIBS #endif