]> git.kaiwu.me - haproxy.git/commitdiff
BUILD: sym: Define HA_HAVE_DL_ITERATE_PHDR on FreeBSD
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 2 Oct 2026 18:22:39 +0000 (20:22 +0200)
committerOlivier Houchard <cognet@ci0.org>
Fri, 2 Oct 2026 18:09:50 +0000 (20:09 +0200)
FreeBSD has been providing dl_iterate_phdr() since FreeBSD 7.0, so
define HA_HAVE_DL_ITERATE_PHDR and HA_HAVE_DUMP_LIBS there.

include/haproxy/compat.h

index 2d76ffb49956b7bf8c0a249d91b1f30a7a94e35e..10fc58bacd5cbf4ba61a04a8214e7a0868826644 100644 (file)
@@ -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