FreeBSD has been providing dl_iterate_phdr() since FreeBSD 7.0, so
define HA_HAVE_DL_ITERATE_PHDR and HA_HAVE_DUMP_LIBS there.
#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