summaryrefslogtreecommitdiff
path: root/archivers/upx/files/patch-stub-linux.hh
diff options
context:
space:
mode:
authorMax Khon <fjoe@FreeBSD.org>2004-02-17 03:05:13 +0000
committerMax Khon <fjoe@FreeBSD.org>2004-02-17 03:05:13 +0000
commit45eebd566c5ab44d538bf10ed87eaea2dcfb05f9 (patch)
tree2667b9621b928eec912e441215b83864391db2a7 /archivers/upx/files/patch-stub-linux.hh
parentTypo fix. (diff)
New port: upx 1.24
UPX is a free, portable, extendable, high-performance executable packer for several different executable formats. It achieves an excellent compression ratio and offers very fast decompression.
Diffstat (limited to 'archivers/upx/files/patch-stub-linux.hh')
-rw-r--r--archivers/upx/files/patch-stub-linux.hh54
1 files changed, 54 insertions, 0 deletions
diff --git a/archivers/upx/files/patch-stub-linux.hh b/archivers/upx/files/patch-stub-linux.hh
new file mode 100644
index 000000000000..868fa38c96a8
--- /dev/null
+++ b/archivers/upx/files/patch-stub-linux.hh
@@ -0,0 +1,54 @@
+--- stub/linux.hh.orig Tue Feb 17 01:31:35 2004
++++ stub/linux.hh Tue Feb 17 07:30:02 2004
+@@ -26,8 +26,8 @@
+ */
+
+
+-#if !defined(__linux__) || !defined(__i386__)
+-# error "this stub must be compiled under linux/i386"
++#if (!defined(__linux__) || !defined(__i386__)) && !defined(__FreeBSD__)
++# error "this stub must be compiled under linux/i386 or FreeBSD"
+ #endif
+
+
+@@ -35,6 +35,16 @@
+ // includes
+ **************************************************************************/
+
++#if defined(__FreeBSD__)
++#include <sys/types.h>
++#include <sys/mman.h>
++#include <sys/time.h>
++#include <sys/wait.h>
++#include <errno.h>
++#include <fcntl.h>
++#include <time.h>
++#include <unistd.h>
++#else
+ struct timex;
+
+ #define __need_timeval
+@@ -54,6 +64,7 @@
+
+ #define CONST_CAST(type, var) \
+ ((type) ((unsigned long) (var)))
++#endif
+
+
+ /*************************************************************************
+@@ -122,6 +133,7 @@
+ #define PAGE_SIZE ( 1u<<12)
+
+
++#if !defined(__FreeBSD__)
+ /*************************************************************************
+ // syscalls
+ //
+@@ -312,6 +324,7 @@
+
+ #undef Z0
+ #undef Z1
++#endif
+
+
+ /*