diff options
author | 2006-05-05 16:46:03 +0000 | |
---|---|---|
committer | 2006-05-05 16:46:03 +0000 | |
commit | 7e7ed8f33d971a25006991594850d32ed120abcb (patch) | |
tree | 295723b42566ea957bd321cb60b9ca96118052e7 | |
parent | - fix rcsdiff exit status on success/errors; now matches gnu/usr.bin/rcs. (diff) | |
download | wireguard-openbsd-7e7ed8f33d971a25006991594850d32ed120abcb.tar.xz wireguard-openbsd-7e7ed8f33d971a25006991594850d32ed120abcb.zip |
sigh, build on non gcc3 systems.
-rw-r--r-- | libexec/ld.so/prebind/prebind.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libexec/ld.so/prebind/prebind.c b/libexec/ld.so/prebind/prebind.c index cd1d8aa0e5e..83d9f99cd02 100644 --- a/libexec/ld.so/prebind/prebind.c +++ b/libexec/ld.so/prebind/prebind.c @@ -1,4 +1,4 @@ -/* $OpenBSD: prebind.c,v 1.10 2006/05/05 13:52:41 jmc Exp $ */ +/* $OpenBSD: prebind.c,v 1.11 2006/05/05 16:46:03 drahn Exp $ */ /* * Copyright (c) 2006 Dale Rahn <drahn@dalerahn.com> * @@ -386,11 +386,15 @@ int elf_check_note(void *buf, Elf_Phdr *phdr) { Elf_Ehdr *ehdr; + u_long address; + u_int *plong; + char *osname; + + ehdr = (Elf_Ehdr *)buf; + address = phdr->p_offset; + plong = (u_int *)((char *)buf + address); + osname = (char *)buf + address + sizeof(*plong) * 3; - ehdr = (Elf_Ehdr *) buf; - u_long address = phdr->p_offset; - u_int *plong = (u_int *)((char *)buf + address); - char *osname = (char *)buf + address + sizeof(*plong) * 3; if (plong[0] == 8 /* OpenBSD\0 */ && plong[1] == 4 /* ??? */ && |