From 2ff865da0541864d15abd6188909e5c36f49f35f Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 20 Jan 2007 15:00:31 +0000 Subject: fix fdisk llseek git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6144 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/util-linux/patches/100-compile_fix.patch | 47 -------------- package/util-linux/patches/100-llseek.patch | 79 ++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 47 deletions(-) delete mode 100644 package/util-linux/patches/100-compile_fix.patch create mode 100644 package/util-linux/patches/100-llseek.patch (limited to 'package/util-linux') diff --git a/package/util-linux/patches/100-compile_fix.patch b/package/util-linux/patches/100-compile_fix.patch deleted file mode 100644 index ed5bfa683b..0000000000 --- a/package/util-linux/patches/100-compile_fix.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff -ur util-linux.old/fdisk/llseek.c util-linux.dev/fdisk/llseek.c ---- util-linux.old/fdisk/llseek.c 2003-07-13 23:13:33.000000000 +0200 -+++ util-linux.dev/fdisk/llseek.c 2006-12-14 23:06:12.000000000 +0100 -@@ -29,13 +29,7 @@ - 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 -+#ifndef __NR__llseek - - /* no __NR__llseek on compilation machine - might give it explicitly */ - static int _llseek (unsigned int fd, unsigned long oh, -diff -ur util-linux.old/fdisk/sfdisk.c util-linux.dev/fdisk/sfdisk.c ---- util-linux.old/fdisk/sfdisk.c 2005-01-04 23:31:57.000000000 +0100 -+++ util-linux.dev/fdisk/sfdisk.c 2006-12-14 23:05:41.000000000 +0100 -@@ -176,12 +176,6 @@ - #define use_lseek - #endif - --#ifndef use_lseek --static __attribute__used --_syscall5(int, _llseek, unsigned int, fd, ulong, hi, ulong, lo, -- loff_t *, res, unsigned int, wh); --#endif -- - static int - sseek(char *dev, unsigned int fd, unsigned long s) { - loff_t in, out; -diff -ur util-linux.old/partx/partx.c util-linux.dev/partx/partx.c ---- util-linux.old/partx/partx.c 2004-08-23 22:13:27.000000000 +0200 -+++ util-linux.dev/partx/partx.c 2006-12-14 23:06:42.000000000 +0100 -@@ -339,9 +339,6 @@ - - #ifdef NEED__llseek - #include /* _syscall */ --static --_syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo, -- long long *, res, uint, wh); - #endif - - static int diff --git a/package/util-linux/patches/100-llseek.patch b/package/util-linux/patches/100-llseek.patch new file mode 100644 index 0000000000..51bd09d6ea --- /dev/null +++ b/package/util-linux/patches/100-llseek.patch @@ -0,0 +1,79 @@ +diff -ur util-linux.old/fdisk/llseek.c util-linux.dev/fdisk/llseek.c +--- util-linux.old/fdisk/llseek.c 2003-07-13 23:13:33.000000000 +0200 ++++ util-linux.dev/fdisk/llseek.c 2006-12-14 23:06:12.000000000 +0100 +@@ -29,13 +29,7 @@ + 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 ++#ifndef __NR__llseek + + /* no __NR__llseek on compilation machine - might give it explicitly */ + static int _llseek (unsigned int fd, unsigned long oh, +diff -ur util-linux.old/fdisk/sfdisk.c util-linux.dev/fdisk/sfdisk.c +--- util-linux.old/fdisk/sfdisk.c 2005-01-04 23:31:57.000000000 +0100 ++++ util-linux.dev/fdisk/sfdisk.c 2006-12-14 23:05:41.000000000 +0100 +@@ -176,12 +176,6 @@ + #define use_lseek + #endif + +-#ifndef use_lseek +-static __attribute__used +-_syscall5(int, _llseek, unsigned int, fd, ulong, hi, ulong, lo, +- loff_t *, res, unsigned int, wh); +-#endif +- + static int + sseek(char *dev, unsigned int fd, unsigned long s) { + loff_t in, out; +diff -ur util-linux.old/partx/partx.c util-linux.dev/partx/partx.c +--- util-linux.old/partx/partx.c 2004-08-23 22:13:27.000000000 +0200 ++++ util-linux.dev/partx/partx.c 2006-12-14 23:06:42.000000000 +0100 +@@ -339,9 +339,6 @@ + + #ifdef NEED__llseek + #include /* _syscall */ +-static +-_syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo, +- long long *, res, uint, wh); + #endif + + static int +diff -ur util-linux.old/fdisk/llseek.c util-linux.dev/fdisk/llseek.c +--- util-linux.old/fdisk/llseek.c 2007-01-20 15:53:17.870636000 +0100 ++++ util-linux.dev/fdisk/llseek.c 2007-01-20 15:55:33.458024160 +0100 +@@ -32,7 +32,7 @@ + #ifndef __NR__llseek + + /* no __NR__llseek on compilation machine - might give it explicitly */ +-static int _llseek (unsigned int fd, unsigned long oh, ++static int __llseek (unsigned int fd, unsigned long oh, + unsigned long ol, long long *result, + unsigned int origin) { + errno = ENOSYS; +@@ -41,17 +41,8 @@ + + #endif + +-static long long my_llseek (unsigned int fd, long long offset, +- unsigned int origin) +-{ +- long long result; +- int retval; +- +- retval = _llseek (fd, ((unsigned long long) offset) >> 32, +- ((unsigned long long) offset) & 0xffffffff, +- &result, origin); +- return (retval == -1 ? (long long) retval : result); +-} ++extern long long llseek(unsigned int fd, long long offset, unsigned int origin); ++#define my_llseek llseek + + #endif /* __alpha__ */ + -- cgit v1.2.3