summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/sparc32/files/sparc32-1.1-include.patch')
-rw-r--r--sys-devel/sparc32/files/sparc32-1.1-include.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/sys-devel/sparc32/files/sparc32-1.1-include.patch b/sys-devel/sparc32/files/sparc32-1.1-include.patch
new file mode 100644
index 000000000000..6e35a3ed0523
--- /dev/null
+++ b/sys-devel/sparc32/files/sparc32-1.1-include.patch
@@ -0,0 +1,42 @@
+--- sparc32-1.1/sparc32.c.jj Mon Apr 22 11:37:47 2002
++++ sparc32-1.1/sparc32.c Mon Apr 22 11:37:47 2002
+@@ -1,10 +1,10 @@
+ /* (C) 1998,1999 Jakub Jelinek under terms of GPL */
+ #include <linux/personality.h>
+-#include <linux/unistd.h>
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <string.h>
+ #include <sys/utsname.h>
++#include <sys/syscall.h>
+
+ #ifndef PER_LINUX32
+ #define PER_LINUX32 8
+@@ -13,8 +13,6 @@
+ #define PER_LINUX_32BIT 0x0800000
+ #endif
+
+-_syscall1(int, personality, long, pers);
+-
+ int main(int argc, char **argv)
+ {
+ char *p = strrchr(argv[0], '/');
+@@ -31,15 +29,15 @@ int main(int argc, char **argv)
+ argc--;
+ }
+ if (!strcmp (p, "sparc32")) {
+- if (personality(PER_LINUX32) == -1) {
++ if (syscall(SYS_personality, PER_LINUX32) == -1) {
+ if (!quiet) perror ("Error setting personality");
+ exit(1);
+ }
+ } else if (!strcmp (p, "sparc64")) {
+ struct utsname un;
+
+- if (personality(PER_LINUX_32BIT) == -1 ||
+- personality(PER_LINUX) == -1) {
++ if (syscall(SYS_personality, PER_LINUX_32BIT) == -1 ||
++ syscall(SYS_personality, PER_LINUX) == -1) {
+ if (!quiet) perror ("Error setting personality");
+ exit(1);
+ }