diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2006-05-05 16:46:04 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2006-05-05 16:46:04 +0000 |
commit | 040921bddbebbe96fa283e2290ab9dbbd354f0b6 (patch) | |
tree | 81e2e44dfafb37e3e206a36c0cf82cf0316f652c | |
parent | 32adbfb76516082a6df498a61500395a81652210 (diff) |
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 /* ??? */ && |