summaryrefslogtreecommitdiff
path: root/dyn_load.c
diff options
context:
space:
mode:
authorKurt Miller <bsdkurt@gmail.com>2021-06-12 09:30:56 +0300
committerIvan Maidanski <ivmai@mail.ru>2021-06-12 09:30:56 +0300
commit9706dbcfdfb4cd18b0622b6ba7428c99d8d7797e (patch)
treeaf5de85ffadead5d1af03adeb99f84851c784bed /dyn_load.c
parent98bc73ba2300b056d7966408e357078c8be0b8ca (diff)
downloadbdwgc-9706dbcfdfb4cd18b0622b6ba7428c99d8d7797e.tar.gz
Ensure ELFSIZE is defined in dyn_load.c for OpenBSD (code refactoring)
Issue #347 (bdwgc). * dyn_load.c [!ElfW && OPENBSD] (ElfW): Define to Elf64_##type only if ELFSIZE==64; issue compile error if ELFSIZE is neither 32 nor 64.
Diffstat (limited to 'dyn_load.c')
-rw-r--r--dyn_load.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dyn_load.c b/dyn_load.c
index 2d51af16..49b1a679 100644
--- a/dyn_load.c
+++ b/dyn_load.c
@@ -149,8 +149,10 @@ STATIC GC_has_static_roots_func GC_has_static_roots = 0;
# 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 ELFSIZE define
# endif
# else
# if !defined(ELF_CLASS) || ELF_CLASS == ELFCLASS32