$OpenBSD: patch-dyn_load_c,v 1.9 2021/02/05 18:37:48 kurt Exp $

- Remove old HAVE_DL_ITERATE_PHDR workaround for OpenBSD

Index: dyn_load.c
--- dyn_load.c.orig
+++ dyn_load.c
@@ -81,13 +81,6 @@ STATIC GC_has_static_roots_func GC_has_static_roots = 
 #   define ELFSIZE ARCH_ELFSIZE
 #endif
 
-#if defined(OPENBSD)
-# include <sys/param.h>
-# if (OpenBSD >= 200519) && !defined(HAVE_DL_ITERATE_PHDR)
-#   define HAVE_DL_ITERATE_PHDR
-# endif
-#endif /* OPENBSD */
-
 #if defined(SCO_ELF) || defined(DGUX) || defined(HURD) \
     || (defined(__ELF__) && (defined(LINUX) || defined(FREEBSD) \
                              || defined(NACL) || defined(NETBSD) \
@@ -150,8 +143,10 @@ STATIC GC_has_static_roots_func GC_has_static_roots = 
 #    elif defined(NETBSD) || defined(OPENBSD)
 #      if ELFSIZE == 32
 #        define ElfW(type) Elf32_##type
-#      else
+#      elif ELFSIZE == 64
 #        define ElfW(type) Elf64_##type
+#      else
+#        error Missing required ELFSIZE define
 #      endif
 #    else
 #      if !defined(ELF_CLASS) || ELF_CLASS == ELFCLASS32
