summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Miller <kurt@intricatesoftware.com>2013-06-02 16:24:36 +0200
committerIvan Maidanski <ivmai@mail.ru>2013-06-02 16:24:36 +0200
commita233df5a38a8b1180b31285f005153f5c337e145 (patch)
tree8bdf0661015e51d79362b9b52792bf8e64fda848
parentd9b749e985d8720e6d102cb297215672becee3a8 (diff)
Register dynamic libraries via dl_iterate_phdr on OpenBSD
* dyn_load.c (HAVE_DL_ITERATE_PHDR): Define for OpenBSD (with release date 2005.19 or later).
-rw-r--r--dyn_load.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/dyn_load.c b/dyn_load.c
index 246195d..5e077b5 100644
--- a/dyn_load.c
+++ b/dyn_load.c
@@ -80,12 +80,19 @@ STATIC GC_has_static_roots_func GC_has_static_roots = 0;
# define ELFSIZE ARCH_ELFSIZE
#endif
+#if defined(OPENBSD)
+# include <sys/param.h>
+# if OpenBSD >= 200519
+# define HAVE_DL_ITERATE_PHDR
+# endif
+#endif /* OPENBSD */
+
#if defined(SCO_ELF) || defined(DGUX) || defined(HURD) \
|| (defined(__ELF__) && (defined(LINUX) || defined(FREEBSD) \
|| defined(NETBSD) || defined(OPENBSD)))
# include <stddef.h>
# if !defined(OPENBSD) && !defined(PLATFORM_ANDROID)
- /* FIXME: Why we exclude it for OpenBSD? */
+ /* OpenBSD does not have elf.h file; link.h below is sufficient. */
/* Exclude Android because linker.h below includes its own version. */
# include <elf.h>
# endif