tags 294836 patch
stop

I was able to reproduce bug #294836 on my powerpc system. I was also
able to fix it by changing some ifdefs. I combined the patch to fix that
with the existing FTBFS patch for bug #393039 and ended up with the
attached patch. It should at least increase the number of platforms that
gpart works on :)
diff -ru gpart-0.1h/src/l64seek.c gpart-0.1h-new/src/l64seek.c
--- gpart-0.1h/src/l64seek.c	2000-12-14 08:54:11.000000000 +1000
+++ gpart-0.1h-new/src/l64seek.c	2006-10-28 04:09:05.000000000 +1000
@@ -25,8 +25,14 @@
 } 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)
+#if defined(__linux__)
+#include <sys/syscall.h>
+# if defined(SYS__llseek)
+static int _llseek(uint fd, ulong hi, ulong lo, loff_t *res, uint wh)
+{
+	return syscall(SYS__llseek, fd, hi, lo, res, wh);
+}
+# endif
 #endif
 
 
@@ -35,7 +41,7 @@
 {
 	off64_t		ret = (off64_t)-1;
 
-#if defined(__linux__) && defined(__i386__)
+#if defined(__linux__) && defined(SYS__llseek)
 	int		iret;
 	unsigned long	ohi, olo;
 
@@ -44,9 +50,7 @@
 	iret = _llseek(fd,ohi,olo,&ret,whence);
 	if (iret == -1)
 		ret = (off64_t)-1;
-#endif
-
-#if defined(__FreeBSD__) || (defined(__linux__) && defined(__alpha__))
+#else
 	ret = lseek(fd,offset,whence);
 #endif
 

Attachment: signature.asc
Description: OpenPGP digital signature



Reply via email to