diff options
Diffstat (limited to 'meta/packages/parted')
-rw-r--r-- | meta/packages/parted/parted-1.8.8/syscalls.patch | 53 | ||||
-rw-r--r-- | meta/packages/parted/parted_1.8.8.bb | 17 |
2 files changed, 70 insertions, 0 deletions
diff --git a/meta/packages/parted/parted-1.8.8/syscalls.patch b/meta/packages/parted/parted-1.8.8/syscalls.patch new file mode 100644 index 0000000000..042fc9769d --- /dev/null +++ b/meta/packages/parted/parted-1.8.8/syscalls.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | --- | ||
2 | libparted/arch/linux.c | 13 +++++++++++++ | ||
3 | 1 file changed, 13 insertions(+) | ||
4 | |||
5 | Index: parted-1.8.8/libparted/arch/linux.c | ||
6 | =================================================================== | ||
7 | --- parted-1.8.8.orig/libparted/arch/linux.c 2007-08-09 20:47:57.000000000 +0200 | ||
8 | +++ parted-1.8.8/libparted/arch/linux.c 2008-10-06 13:49:17.000000000 +0200 | ||
9 | @@ -18,6 +18,8 @@ | ||
10 | |||
11 | #define PROC_DEVICES_BUFSIZ 16384 | ||
12 | |||
13 | +#include <linux/version.h> | ||
14 | + | ||
15 | #include <config.h> | ||
16 | |||
17 | #include <parted/parted.h> | ||
18 | @@ -1361,12 +1363,14 @@ linux_refresh_close (PedDevice* dev) | ||
19 | |||
20 | #if SIZEOF_OFF_T < 8 | ||
21 | |||
22 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) | ||
23 | static _syscall5(int,_llseek, | ||
24 | unsigned int, fd, | ||
25 | unsigned long, offset_high, | ||
26 | unsigned long, offset_low, | ||
27 | loff_t*, result, | ||
28 | unsigned int, origin) | ||
29 | +#endif | ||
30 | |||
31 | loff_t | ||
32 | llseek (unsigned int fd, loff_t offset, unsigned int whence) | ||
33 | @@ -1374,11 +1378,20 @@ llseek (unsigned int fd, loff_t offset, | ||
34 | loff_t result; | ||
35 | int retval; | ||
36 | |||
37 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) | ||
38 | retval = _llseek(fd, | ||
39 | ((unsigned long long)offset) >> 32, | ||
40 | ((unsigned long long)offset) & 0xffffffff, | ||
41 | &result, | ||
42 | whence); | ||
43 | +#else | ||
44 | + retval = syscall(__NR__llseek, fd, | ||
45 | + ((unsigned long long)offset) >> 32, | ||
46 | + ((unsigned long long)offset) & 0xffffffff, | ||
47 | + &result, | ||
48 | + whence); | ||
49 | +#endif | ||
50 | + | ||
51 | return (retval==-1 ? (loff_t) retval : result); | ||
52 | } | ||
53 | |||
diff --git a/meta/packages/parted/parted_1.8.8.bb b/meta/packages/parted/parted_1.8.8.bb new file mode 100644 index 0000000000..633a1006ae --- /dev/null +++ b/meta/packages/parted/parted_1.8.8.bb | |||
@@ -0,0 +1,17 @@ | |||
1 | DESCRIPTION = "parted, the GNU partition resizing program" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/parted/parted.html" | ||
3 | LICENSE = "GPLv2" | ||
4 | SECTION = "console/tools" | ||
5 | DEPENDS = "readline e2fsprogs-libs" | ||
6 | PR = "r0" | ||
7 | |||
8 | SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.gz \ | ||
9 | file://syscalls.patch;patch=1 " | ||
10 | |||
11 | EXTRA_OECONF = "--disable-Werror gl_cv_ignore_unused_libraries=none" | ||
12 | |||
13 | inherit autotools pkgconfig | ||
14 | |||
15 | do_stage() { | ||
16 | autotools_stage_all | ||
17 | } | ||