summaryrefslogtreecommitdiffstats
path: root/meta/packages/qemu/files/31_syscalls.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/qemu/files/31_syscalls.patch')
-rw-r--r--meta/packages/qemu/files/31_syscalls.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/meta/packages/qemu/files/31_syscalls.patch b/meta/packages/qemu/files/31_syscalls.patch
new file mode 100644
index 0000000000..e7a1b338f3
--- /dev/null
+++ b/meta/packages/qemu/files/31_syscalls.patch
@@ -0,0 +1,62 @@
1#DPATCHLEVEL=0
2---
3# Makefile.target | 2 +-
4# linux-user/syscall.c | 11 ++++++++---
5# 2 files changed, 9 insertions(+), 4 deletions(-)
6#
7Index: linux-user/syscall.c
8===================================================================
9--- linux-user/syscall.c.orig 2007-06-13 11:51:52.000000000 +0100
10+++ linux-user/syscall.c 2007-06-13 11:52:18.000000000 +0100
11@@ -180,6 +180,7 @@ extern int getresuid(uid_t *, uid_t *, u
12 extern int setresgid(gid_t, gid_t, gid_t);
13 extern int getresgid(gid_t *, gid_t *, gid_t *);
14 extern int setgroups(int, gid_t *);
15+extern int uselib(const char*);
16
17 /*
18 * This list is the union of errno values overidden in asm-<arch>/errno.h
19@@ -3215,7 +3216,8 @@ long do_syscall(void *cpu_env, int num,
20 break;
21 #ifdef TARGET_NR_uselib
22 case TARGET_NR_uselib:
23- goto unimplemented;
24+ ret = get_errno(uselib(path((const char*)arg1)));
25+ break;
26 #endif
27 #ifdef TARGET_NR_swapon
28 case TARGET_NR_swapon:
29@@ -4405,7 +4407,9 @@ long do_syscall(void *cpu_env, int num,
30 goto unimplemented;
31 #ifdef TARGET_NR_mincore
32 case TARGET_NR_mincore:
33- goto unimplemented;
34+ page_unprotect_range((void*)arg3, ((size_t)arg2 + TARGET_PAGE_SIZE - 1) / TARGET_PAGE_SIZE);
35+ ret = get_errno(mincore((void*)arg1, (size_t)arg2, (unsigned char*)arg3));
36+ break;
37 #endif
38 #ifdef TARGET_NR_madvise
39 case TARGET_NR_madvise:
40@@ -4539,7 +4543,8 @@ long do_syscall(void *cpu_env, int num,
41 break;
42 #ifdef TARGET_NR_readahead
43 case TARGET_NR_readahead:
44- goto unimplemented;
45+ ret = get_errno(readahead((int)arg1, (off64_t)arg2, (size_t)arg3));
46+ break;
47 #endif
48 #ifdef TARGET_NR_setxattr
49 case TARGET_NR_setxattr:
50Index: Makefile.target
51===================================================================
52--- Makefile.target.orig 2007-06-13 11:51:52.000000000 +0100
53+++ Makefile.target 2007-06-13 11:51:54.000000000 +0100
54@@ -215,7 +215,7 @@ OP_LDFLAGS+=$(OS_LDFLAGS) $(ARCH_LDFLAGS
55 #########################################################
56
57 CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
58-LIBS+=-lm
59+LIBS+=-lm -lrt
60 ifndef CONFIG_USER_ONLY
61 LIBS+=-lz
62 endif