$OpenBSD: patch-dyn_load_c,v 1.7 2013/06/01 21:05:28 kurt Exp $
--- dyn_load.c.orig	Thu Aug  9 16:25:13 2012
+++ dyn_load.c	Tue Mar 19 19:39:39 2013
@@ -83,12 +83,20 @@ STATIC GC_has_static_roots_func GC_has_static_roots = 
 #   define ELFSIZE ARCH_ELFSIZE
 #endif
 
+#if defined(OPENBSD)
+# include <sys/param.h>
+# include <dlfcn.h>
+# if OpenBSD >= 200519
+#   define HAVE_DL_ITERATE_PHDR
+# endif
+#endif
+
 #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 doesn't have elf.h. link.h below is sufficent */
     /* Exclude Android because linker.h below includes its own version. */
 #   include <elf.h>
 # endif
