2008-05-01 04:53:49 +02:00
|
|
|
Index: archive/llseek.c
|
2008-08-14 02:37:47 +02:00
|
|
|
===================================================================
|
|
|
|
--- archive/llseek.c.orig
|
2008-05-01 04:53:49 +02:00
|
|
|
+++ archive/llseek.c
|
2008-08-14 02:37:47 +02:00
|
|
|
@@ -9,9 +9,9 @@
|
|
|
|
* Changed "ext2_" prefix to "llse".
|
2008-05-01 04:53:49 +02:00
|
|
|
*/
|
|
|
|
#define _XOPEN_SOURCE 500
|
|
|
|
#define _GNU_SOURCE
|
|
|
|
-
|
|
|
|
+#define _LARGEFILE64_SOURCE 1
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
#include <errno.h>
|
2008-08-14 02:37:47 +02:00
|
|
|
#include <unistd.h>
|
|
|
|
@@ -30,9 +30,9 @@ extern llse_loff_t llse_llseek (unsigned
|
|
|
|
#include <syscall.h>
|
2008-05-01 04:53:49 +02:00
|
|
|
|
|
|
|
#else /* HAVE_LLSEEK */
|
|
|
|
|
|
|
|
-#if defined(__alpha__) || defined(__ia64__) || defined(__s390x__)
|
|
|
|
+#if defined(__alpha__) || defined(__ia64__) || defined(__s390x__) || defined (__x86_64__) || defined (__powerpc64__)
|
|
|
|
|
|
|
|
#define my_llseek lseek
|
|
|
|
|
2008-08-14 02:37:47 +02:00
|
|
|
#else
|
|
|
|
@@ -42,12 +42,8 @@ static int _llseek (unsigned int, unsign
|
|
|
|
unsigned long, llse_loff_t *, unsigned int);
|
2008-05-01 04:53:49 +02:00
|
|
|
|
|
|
|
#ifdef __NR__llseek
|
|
|
|
|
|
|
|
-static _syscall5(int,_llseek,unsigned int,fd,unsigned long,offset_high,
|
|
|
|
- unsigned long, offset_low,llse_loff_t *,result,
|
|
|
|
- unsigned int, origin)
|
|
|
|
-
|
|
|
|
#else
|
|
|
|
|
|
|
|
/* no __NR__llseek on compilation machine - might give it explicitly */
|
2008-08-14 02:37:47 +02:00
|
|
|
static int _llseek (unsigned int fd, unsigned long oh,
|
|
|
|
@@ -63,13 +59,16 @@ static llse_loff_t my_llseek (unsigned i
|
|
|
|
unsigned int origin)
|
|
|
|
{
|
2008-05-01 04:53:49 +02:00
|
|
|
llse_loff_t result;
|
|
|
|
int retval;
|
2008-08-14 02:37:47 +02:00
|
|
|
-
|
|
|
|
+#if 0
|
|
|
|
retval = _llseek (fd, ((uint64_t) offset) >> 32,
|
|
|
|
((uint64_t) offset) & 0xffffffff,
|
|
|
|
&result, origin);
|
|
|
|
return (retval == -1 ? (llse_loff_t) retval : result);
|
|
|
|
+#else
|
|
|
|
+ return lseek64 (fd, offset, origin);
|
|
|
|
+#endif
|
2008-05-01 04:53:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* __alpha__ */
|
2008-08-14 02:37:47 +02:00
|
|
|
|