pkgsrc/devel/elfsh/patches/patch-libelfsh_reloc_c
dholland c01bc27911 - Work around symbol name conflict with dprintf in current.
- The makefile's substitution of PREFIX and SH accidentally got rolled
into patch-ac at some point and thereby hardcoded. Since all patch-ac
was doing was setting these, make the substitution work without a
patch and remove patch-ac entirely.

- Commit some LP64 fixes I've had sitting in my tree since 2008 for
some reason.

- Fix some pkglint.

- PKGREVISION -> 4.
2011-10-02 23:50:56 +00:00

15 lines
641 B
Text

$NetBSD: patch-libelfsh_reloc_c,v 1.1 2011/10/02 23:50:56 dholland Exp $
- LP64 fixes
--- libelfsh/reloc.c~ 2003-08-20 21:28:41.000000000 -0400
+++ libelfsh/reloc.c 2008-08-02 18:10:19.000000000 -0400
@@ -304,7 +304,7 @@ elfshrel_t *elfsh_find_rel(elfshsect_t *
target = elfsh_get_parent_section(sect->parent, *dword, NULL);
if (target != NULL)
{
- vaddr = sect->shdr->sh_addr + (u_int) str - (u_int) sect->data;
+ vaddr = sect->shdr->sh_addr + (uintptr_t) str - (uintptr_t) sect->data;
rel[index].idx_src = sect->index;
rel[index].off_src = vaddr - sect->shdr->sh_addr;
rel[index].idx_dst = target->index;