47 lines
1.2 KiB
Diff
47 lines
1.2 KiB
Diff
|
Index: archive/llseek.c
|
||
|
================================================================================
|
||
|
--- archive/llseek.c
|
||
|
+++ archive/llseek.c
|
||
|
@@ -10,7 +10,7 @@
|
||
|
*/
|
||
|
#define _XOPEN_SOURCE 500
|
||
|
#define _GNU_SOURCE
|
||
|
-
|
||
|
+#define _LARGEFILE64_SOURCE 1
|
||
|
#include <sys/types.h>
|
||
|
|
||
|
#include <errno.h>
|
||
|
@@ -31,7 +31,7 @@
|
||
|
|
||
|
#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
|
||
|
|
||
|
@@ -43,10 +43,6 @@
|
||
|
|
||
|
#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 */
|
||
|
@@ -65,10 +61,8 @@
|
||
|
llse_loff_t result;
|
||
|
int retval;
|
||
|
|
||
|
- retval = _llseek (fd, ((unsigned long long) offset) >> 32,
|
||
|
- ((unsigned long long) offset) & 0xffffffff,
|
||
|
- &result, origin);
|
||
|
- return (retval == -1 ? (llse_loff_t) retval : result);
|
||
|
+ result = lseek64 (fd, offset, origin);
|
||
|
+ return result;
|
||
|
}
|
||
|
|
||
|
#endif /* __alpha__ */
|