freebsd-ports/devel/boehm-gc/files/patch-dyn_load.c
Tilman Keskinoz 8c3b62b377 Unbreak boehm-gc on 32bit platforms.
Submitted by:		Ryan Beasley <ryanb@goddamnbastard.org>
pointy hat^2 to:	arved
2004-05-08 10:54:50 +00:00

22 lines
629 B
C

--- dyn_load.c.orig 2004-05-05 11:53:09.000000000 +0200
+++ dyn_load.c 2004-05-05 12:03:40.000000000 +0200
@@ -91,11 +91,19 @@
/* Newer versions of GNU/Linux define this macro. We
* define it similarly for any ELF systems that don't. */
# ifndef ElfW
+#ifdef __FreeBSD__
+#if __ELF_WORD_SIZE == 32
+#define ElfW(type) Elf32_##type
+#else
+#define ElfW(type) Elf64_##type
+#endif
+#else
# if !defined(ELF_CLASS) || ELF_CLASS == ELFCLASS32
# define ElfW(type) Elf32_##type
# else
# define ElfW(type) Elf64_##type
# endif
+#endif
# endif
#if defined(SUNOS5DL) && !defined(USE_PROC_FOR_LIBRARIES)