summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-05-09 15:44:48 (GMT)
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-05-09 15:44:48 (GMT)
commitd5cc557d2d5a73788ec99004b1c061bf85c5fd91 (patch)
tree3fb7e4edd0154482883aa03717b5d8fb05a0ee3c
parentde1f009cde35075efb047dc9267a22b730f34b2a (diff)
downloadpatchelf-d5cc557d2d5a73788ec99004b1c061bf85c5fd91.zip
patchelf-d5cc557d2d5a73788ec99004b1c061bf85c5fd91.tar.gz
patchelf-d5cc557d2d5a73788ec99004b1c061bf85c5fd91.tar.bz2
* Compilation fixes for FreeBSD 4.
-rw-r--r--src/patchelf.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/patchelf.cc b/src/patchelf.cc
index d5175a2..435e157 100644
--- a/src/patchelf.cc
+++ b/src/patchelf.cc
@@ -80,6 +80,8 @@ private:
}
};
+ friend CompShdr;
+
void sortShdrs();
void shiftFile(unsigned int extraPages, Elf_Addr startPage);
@@ -138,6 +140,26 @@ private:
};
+/* Some old versions of elf.h lack some required macros, so define
+ them if they're missing. */
+#ifndef ELFMAG
+#define ELFMAG "\177ELF"
+#define SELFMAG 4
+#endif
+
+#ifndef DT_VERNEED
+#define DT_VERNEED 0x6ffffffe
+#endif
+
+#ifndef DT_VERNEEDNUM
+#define DT_VERNEEDNUM 0x6fffffff
+#endif
+
+#ifndef DT_VERSYM
+#define DT_VERSYM 0x6ffffff0
+#endif
+
+
static void debug(const char * format, ...)
{
if (debugMode) {