|
|
@ -0,0 +1,64 @@ |
|
|
|
--- ./fdisk/llseek.c 2007-05-21 11:45:41.000000000 +0200
|
|
|
|
+++ ./fdisk/llseek.c 2007-05-21 11:53:14.000000000 +0200
|
|
|
|
@@ -5,6 +5,7 @@
|
|
|
|
* under the terms of the GNU Public License. |
|
|
|
*/ |
|
|
|
|
|
|
|
+#include <sys/syscall.h>
|
|
|
|
#include <sys/types.h> |
|
|
|
|
|
|
|
#include <errno.h> |
|
|
|
@@ -26,27 +27,12 @@
|
|
|
|
#else |
|
|
|
#include <linux/unistd.h> /* for __NR__llseek */ |
|
|
|
|
|
|
|
-static int _llseek (unsigned int, unsigned long,
|
|
|
|
- unsigned long, long long *, unsigned int);
|
|
|
|
-
|
|
|
|
-#ifdef __NR__llseek
|
|
|
|
-
|
|
|
|
-static _syscall5(int,_llseek,unsigned int,fd,unsigned long,offset_high,
|
|
|
|
- unsigned long, offset_low,long long *,result,
|
|
|
|
- unsigned int, origin)
|
|
|
|
-
|
|
|
|
-#else
|
|
|
|
-
|
|
|
|
-/* no __NR__llseek on compilation machine - might give it explicitly */
|
|
|
|
static int _llseek (unsigned int fd, unsigned long oh, |
|
|
|
unsigned long ol, long long *result, |
|
|
|
unsigned int origin) { |
|
|
|
- errno = ENOSYS;
|
|
|
|
- return -1;
|
|
|
|
+ return syscall(__NR__llseek, fd, oh, ol, result, origin);
|
|
|
|
} |
|
|
|
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
static long long my_llseek (unsigned int fd, long long offset, |
|
|
|
unsigned int origin) |
|
|
|
{ |
|
|
|
--- ./fdisk/sfdisk.c 2007-05-21 11:48:48.000000000 +0200
|
|
|
|
+++ ./fdisk/sfdisk.c 2007-05-21 11:54:32.000000000 +0200
|
|
|
|
@@ -47,6 +47,7 @@
|
|
|
|
#include <getopt.h> |
|
|
|
#include <sys/ioctl.h> |
|
|
|
#include <sys/stat.h> |
|
|
|
+#include <sys/syscall.h>
|
|
|
|
#include <sys/utsname.h> |
|
|
|
#include <linux/unistd.h> /* _syscall */ |
|
|
|
#include "nls.h" |
|
|
|
@@ -177,9 +178,11 @@
|
|
|
|
#endif |
|
|
|
|
|
|
|
#ifndef use_lseek |
|
|
|
-static __attribute__used
|
|
|
|
-_syscall5(int, _llseek, unsigned int, fd, ulong, hi, ulong, lo,
|
|
|
|
- loff_t *, res, unsigned int, wh);
|
|
|
|
+static int _llseek (unsigned int fd, unsigned long oh,
|
|
|
|
+ unsigned long ol, long long *result,
|
|
|
|
+ unsigned int origin) {
|
|
|
|
+ return syscall(__NR__llseek, fd, oh, ol, result, origin);
|
|
|
|
+}
|
|
|
|
#endif |
|
|
|
|
|
|
|
static int |