summaryrefslogtreecommitdiff
blob: 6e35a3ed05233e2308afde37e4710e742b472f7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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);
 		}