summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-09-06 19:40:22 +0000
committerRichard M. Stallman <rms@gnu.org>1997-09-06 19:40:22 +0000
commitd02df2be03176a6434a97322061da93794eb124c (patch)
treea1d97eaf18f26576f9b9ec2558e1b69c747ddba3 /src
parente0b4fd0fe9331a1e161e31fd6899c37cb3ee3f49 (diff)
downloademacs-d02df2be03176a6434a97322061da93794eb124c.tar.gz
Test __OpenBSD__ along with __NetBSD__.
[__OpenBSD__]: Include sys/exec_elf.h.
Diffstat (limited to 'src')
-rw-r--r--src/unexelf.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/unexelf.c b/src/unexelf.c
index 79a398228ea..0a8b6068d30 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -420,7 +420,7 @@ Filesz Memsz Flags Align
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
-#ifndef __NetBSD__
+#if !defined (__NetBSD__) && !defined (__OpenBSD__)
#include <elf.h>
#endif
#include <sys/mman.h>
@@ -429,7 +429,7 @@ Filesz Memsz Flags Align
#include <sym.h>
#endif /* __sony_news && _SYSTYPE_SYSV */
-#if defined (__alpha__) && !defined (__NetBSD__)
+#if defined (__alpha__) && !defined (__NetBSD__) && !defined (__OpenBSD__)
#include <sym.h> /* get COFF debugging symbol table declaration */
#endif
@@ -473,6 +473,10 @@ Filesz Memsz Flags Align
# endif
#endif /* __NetBSD__ */
+#ifdef __OpenBSD__
+# include <sys/exec_elf.h>
+#endif
+
#if __GNU_LIBRARY__ - 0 >= 6
# include <link.h> /* get ElfW etc */
#endif
@@ -682,7 +686,7 @@ unexec (new_name, old_name, data_start, bss_start, entry_address)
old_bss_addr = OLD_SECTION_H (old_bss_index).sh_addr;
old_bss_size = OLD_SECTION_H (old_bss_index).sh_size;
#endif /* not (__sony_news && _SYSTYPE_SYSV) */
-#if defined(emacs) || !defined(DEBUG)
+#if defined (emacs) || !defined (DEBUG)
new_bss_addr = (ElfW(Addr)) sbrk (0);
#else
new_bss_addr = old_bss_addr + old_bss_size + 0x1234;