summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/parted/files/syscalls.patch
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2014-11-13 12:50:58 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-11-20 14:08:12 +0000
commitaa2c1548b3e5ad06468bf86a242d2a2032aa652d (patch)
tree981e8959d47ab17c0f66ad93b3f9cff37a290f84 /meta/recipes-extended/parted/files/syscalls.patch
parent8aa5f17b08193aeebd58e58ba64f247109f3bd03 (diff)
downloadpoky-aa2c1548b3e5ad06468bf86a242d2a2032aa652d.tar.gz
parted: upgrade to 3.2
Drop fix-git-version-gen.patch, fix-dvh-overflows.patch and fix-deprecated-readline.patch, because the parted 3.2 have merged them. Add fix-compile-failure-while-dis.patch to fix compile failure (From OE-Core rev: 5faae24198ded58c5328e9f3e5ab99c89047a57d) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/parted/files/syscalls.patch')
-rw-r--r--meta/recipes-extended/parted/files/syscalls.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/meta/recipes-extended/parted/files/syscalls.patch b/meta/recipes-extended/parted/files/syscalls.patch
new file mode 100644
index 0000000000..e9bbe9a956
--- /dev/null
+++ b/meta/recipes-extended/parted/files/syscalls.patch
@@ -0,0 +1,55 @@
1Upstream-Status: Pending
2
3---
4 libparted/arch/linux.c | 13 +++++++++++++
5 1 file changed, 13 insertions(+)
6
7Index: parted-1.9.0/libparted/arch/linux.c
8===================================================================
9--- parted-1.9.0.orig/libparted/arch/linux.c 2009-07-23 18:52:08.000000000 +0100
10+++ parted-1.9.0/libparted/arch/linux.c 2010-02-02 14:14:16.523904768 +0000
11@@ -17,6 +17,8 @@
12
13 #define PROC_DEVICES_BUFSIZ 16384
14
15+#include <linux/version.h>
16+
17 #include <config.h>
18 #include <arch/linux.h>
19
20@@ -1477,12 +1479,14 @@
21
22 #if SIZEOF_OFF_T < 8
23
24+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
25 static _syscall5(int,_llseek,
26 unsigned int, fd,
27 unsigned long, offset_high,
28 unsigned long, offset_low,
29 loff_t*, result,
30 unsigned int, origin)
31+#endif
32
33 loff_t
34 llseek (unsigned int fd, loff_t offset, unsigned int whence)
35@@ -1490,11 +1494,20 @@
36 loff_t result;
37 int retval;
38
39+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
40 retval = _llseek(fd,
41 ((unsigned long long)offset) >> 32,
42 ((unsigned long long)offset) & 0xffffffff,
43 &result,
44 whence);
45+#else
46+ retval = syscall(__NR__llseek, fd,
47+ ((unsigned long long)offset) >> 32,
48+ ((unsigned long long)offset) & 0xffffffff,
49+ &result,
50+ whence);
51+#endif
52+
53 return (retval==-1 ? (loff_t) retval : result);
54 }
55