Group :: Sistema/Configurações/Hadware
RPM: gpart
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: gpart-0.1h-deb-llseek.patch
Download
Download
diff -ruNw gpart-0.1h.alt/src/l64seek.c gpart-0.1h.deb/src/l64seek.c
--- gpart-0.1h.alt/src/l64seek.c 2008-04-01 01:37:48 +0400
+++ gpart-0.1h.deb/src/l64seek.c 2008-04-01 01:38:13 +0400
@@ -25,30 +25,11 @@
} ostck[OSTACKLEN];
static int osptr = -1;
-#if defined(__linux__) && defined(__i386__)
-_syscall5(int,_llseek,uint,fd,ulong,hi,ulong,lo,loff_t *,res,uint,wh)
-#endif
-
-
-
off64_t l64seek(int fd,off64_t offset,int whence)
{
off64_t ret = (off64_t)-1;
-#if defined(__linux__) && defined(__i386__)
- int iret;
- unsigned long ohi, olo;
-
- ohi = (unsigned long)((offset >> 32) & 0xFFFFFFFF);
- olo = (unsigned long)(offset & 0xFFFFFFFF);
- iret = _llseek(fd,ohi,olo,&ret,whence);
- if (iret == -1)
- ret = (off64_t)-1;
-#endif
-
-#if defined(__FreeBSD__) || (defined(__linux__) && !defined(__i386__))
ret = lseek(fd,offset,whence);
-#endif
return (ret);
}
diff -ruNw gpart-0.1h.alt/src/l64seek.h gpart-0.1h.deb/src/l64seek.h
--- gpart-0.1h.alt/src/l64seek.h 2008-04-01 01:37:48 +0400
+++ gpart-0.1h.deb/src/l64seek.h 2008-04-01 01:38:13 +0400
@@ -17,6 +17,8 @@
#ifndef _L64SEEK_H
#define _L64SEEK_H
+#include <sys/stat.h>
+#include <sys/types.h>
#include <unistd.h>
/*
@@ -25,20 +27,7 @@
* offsets.
*/
-
-#if defined(__linux__)
-# include <linux/unistd.h>
-# include <sys/types.h>
-# include <errno.h>
- typedef int64_t off64_t;
-#endif
-
-
-#if defined(__FreeBSD__)
- typedef off_t off64_t;
-#endif
-
-
+typedef loff_t off64_t;
typedef off64_t s64_t;
off64_t l64seek(int fd, off64_t offset, int whence);
@@ -46,5 +35,4 @@
int l64opush(int);
s64_t l64opop(int);
-
#endif