summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/dosfstools/dosfstools/2.6.20-syscall.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/dosfstools/dosfstools/2.6.20-syscall.patch')
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/2.6.20-syscall.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/2.6.20-syscall.patch b/meta/recipes-devtools/dosfstools/dosfstools/2.6.20-syscall.patch
new file mode 100644
index 0000000000..7cf2662d27
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/2.6.20-syscall.patch
@@ -0,0 +1,65 @@
1Index: dosfstools-2.10/dosfsck/io.c
2===================================================================
3--- dosfstools-2.10.orig/dosfsck/io.c 2007-06-07 16:15:52.000000000 +0200
4+++ dosfstools-2.10/dosfsck/io.c 2007-06-07 16:16:06.000000000 +0200
5@@ -42,28 +42,11 @@
6 /* Use the _llseek system call directly, because there (once?) was a bug in
7 * the glibc implementation of it. */
8 #include <linux/unistd.h>
9-#if defined __alpha || defined __ia64__ || defined __s390x__ || defined __x86_64__ || defined __ppc64__
10 /* On alpha, the syscall is simply lseek, because it's a 64 bit system. */
11 static loff_t llseek( int fd, loff_t offset, int whence )
12 {
13 return lseek(fd, offset, whence);
14 }
15-#else
16-# ifndef __NR__llseek
17-# error _llseek system call not present
18-# endif
19-static _syscall5( int, _llseek, uint, fd, ulong, hi, ulong, lo,
20- loff_t *, res, uint, wh );
21-
22-static loff_t llseek( int fd, loff_t offset, int whence )
23-{
24- loff_t actual;
25-
26- if (_llseek(fd, offset>>32, offset&0xffffffff, &actual, whence) != 0)
27- return (loff_t)-1;
28- return actual;
29-}
30-#endif
31
32
33 void fs_open(char *path,int rw)
34Index: dosfstools-2.10/mkdosfs/mkdosfs.c
35===================================================================
36--- dosfstools-2.10.orig/mkdosfs/mkdosfs.c 2007-06-07 16:15:11.000000000 +0200
37+++ dosfstools-2.10/mkdosfs/mkdosfs.c 2007-06-07 16:15:30.000000000 +0200
38@@ -116,27 +116,11 @@
39 /* Use the _llseek system call directly, because there (once?) was a bug in
40 * the glibc implementation of it. */
41 #include <linux/unistd.h>
42-#if defined __alpha || defined __ia64__ || defined __s390x__ || defined __x86_64__ || defined __ppc64__
43 /* On alpha, the syscall is simply lseek, because it's a 64 bit system. */
44 static loff_t llseek( int fd, loff_t offset, int whence )
45 {
46 return lseek(fd, offset, whence);
47 }
48-#else
49-# ifndef __NR__llseek
50-# error _llseek system call not present
51-# endif
52-static _syscall5( int, _llseek, uint, fd, ulong, hi, ulong, lo,
53- loff_t *, res, uint, wh );
54-static loff_t llseek( int fd, loff_t offset, int whence )
55-{
56- loff_t actual;
57-
58- if (_llseek(fd, offset>>32, offset&0xffffffff, &actual, whence) != 0)
59- return (loff_t)-1;
60- return actual;
61-}
62-#endif
63
64 #define ROUND_UP(value, divisor) (value + (divisor - (value % divisor))) / divisor
65