summaryrefslogtreecommitdiff
path: root/archivers/upx/patches
diff options
context:
space:
mode:
authorhans <hans>2012-02-15 19:27:10 +0000
committerhans <hans>2012-02-15 19:27:10 +0000
commit925af79596a5a09d373d90c5c66ca8eabb4a7e90 (patch)
tree8d612d7080b54c1df12662683a57b4696c1e7b26 /archivers/upx/patches
parent3aebdc85f35a22435e2780df70f896e21650200c (diff)
downloadpkgsrc-925af79596a5a09d373d90c5c66ca8eabb4a7e90.tar.gz
Fix build on SunOS.
Diffstat (limited to 'archivers/upx/patches')
-rw-r--r--archivers/upx/patches/patch-src_p__exe.cpp40
-rw-r--r--archivers/upx/patches/patch-src_p__exe.h13
2 files changed, 53 insertions, 0 deletions
diff --git a/archivers/upx/patches/patch-src_p__exe.cpp b/archivers/upx/patches/patch-src_p__exe.cpp
new file mode 100644
index 00000000000..3fee5128033
--- /dev/null
+++ b/archivers/upx/patches/patch-src_p__exe.cpp
@@ -0,0 +1,40 @@
+$NetBSD: patch-src_p__exe.cpp,v 1.1 2012/02/15 19:27:10 hans Exp $
+
+--- src/p_exe.cpp.orig 2004-03-25 06:36:19.000000000 +0100
++++ src/p_exe.cpp 2012-01-11 15:35:13.755302407 +0100
+@@ -347,7 +347,7 @@ void PackExe::pack(OutputFile *fo)
+ {
+ set_le16(extra_info+eisize,ih.ss);
+ eisize += 2;
+- flag |= SS;
++ flag |= upx_SS;
+ }
+ if (oh.sp != ih.sp)
+ {
+@@ -413,7 +413,7 @@ void PackExe::pack(OutputFile *fo)
+ NULL
+ );
+ addLoader("EXEMAIN8",
+- (flag & SS) ? "EXESTACK" : "",
++ (flag & upx_SS) ? "EXESTACK" : "",
+ (flag & SP) ? "EXESTASP" : "",
+ (flag & USEJUMP) ? "EXEJUMPF" : "",
+ NULL
+@@ -480,7 +480,7 @@ void PackExe::pack(OutputFile *fo)
+ }
+ if (flag & SP)
+ patch_le16(loader,lsize,"SP",ih.sp);
+- if (flag & SS)
++ if (flag & upx_SS)
+ patch_le16(loader,lsize,"SS",ih.ss);
+ if (relocsize)
+ patch_le16(loader,lsize,"RS",(ph.u_len <= DI_LIMIT || (ph.u_len & 0x7fff) >= relocsize ? 0 : MAXRELOCS) - relocsize);
+@@ -654,7 +654,7 @@ void PackExe::unpack(OutputFile *fo)
+ { imagesize -= 2; oh.min = get_le16(ibuf+imagesize); }
+ if (flag & SP)
+ { imagesize -= 2; oh.sp = get_le16(ibuf+imagesize); }
+- if (flag & SS)
++ if (flag & upx_SS)
+ { imagesize -= 2; oh.ss = get_le16(ibuf+imagesize); }
+
+ unsigned ip = (flag & USEJUMP) ? get_le32(ibuf+imagesize-4) : (unsigned) ih.firstreloc;
diff --git a/archivers/upx/patches/patch-src_p__exe.h b/archivers/upx/patches/patch-src_p__exe.h
new file mode 100644
index 00000000000..2118982c6cc
--- /dev/null
+++ b/archivers/upx/patches/patch-src_p__exe.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_p__exe.h,v 1.1 2012/02/15 19:27:10 hans Exp $
+
+--- src/p_exe.h.orig 2002-06-01 13:20:17.000000000 +0200
++++ src/p_exe.h 2012-01-11 15:33:21.472848400 +0100
+@@ -96,7 +96,7 @@ protected:
+ enum {
+ NORELOC = 1,
+ USEJUMP = 2,
+- SS = 4,
++ upx_SS = 4,
+ SP = 8,
+ MINMEM = 16,
+ MAXMEM = 32