tags 395512 patch stop Here's a patch to fix the FTBFS. It's very similar to the one for the FTBFS in sg-utils, but this one uses a function wrapper rather than a preprocessor macro in order to get type-checking and it follows the existing code style better.
diff -rup sg3-utils-1.21/llseek.c sg3-utils-1.21-new/llseek.c --- sg3-utils-1.21/llseek.c 2004-08-24 11:33:10.000000000 +1000 +++ sg3-utils-1.21-new/llseek.c 2006-10-28 23:14:30.000000000 +1000 @@ -26,30 +26,28 @@ #ifdef __linux__ -#ifdef HAVE_LLSEEK -#include <syscall.h> - -#else /* HAVE_LLSEEK */ - #if defined(__alpha__) || defined(__ia64__) || defined(__s390x__) #define my_llseek lseek #else -#include <linux/unistd.h> /* for __NR__llseek */ +#include <sys/syscall.h> /* for SYS__llseek */ static int _llseek (unsigned int, unsigned long, unsigned long, llse_loff_t *, unsigned int); -#ifdef __NR__llseek +#ifdef SYS__llseek -static _syscall5(int,_llseek,unsigned int,fd,unsigned long,offset_high, - unsigned long, offset_low,llse_loff_t *,result, - unsigned int, origin) +static int _llseek(unsigned int fd, unsigned long offset_high, + unsigned long offset_low, llse_loff_t *result, + unsigned int origin) { + return syscall(SYS__llseek, fd, offset_high, offset_low, + result, origin); +} -#else +#else /* !SYS__llseek */ -/* no __NR__llseek on compilation machine - might give it explicitly */ +/* no SYS__llseek on compilation machine - might give it explicitly */ static int _llseek (unsigned int fd, unsigned long oh, unsigned long ol, llse_loff_t *result, unsigned int origin) { @@ -73,8 +71,6 @@ static llse_loff_t my_llseek (unsigned i #endif /* __alpha__ */ -#endif /* HAVE_LLSEEK */ - llse_loff_t llse_llseek (unsigned int fd, llse_loff_t offset, unsigned int origin) {
signature.asc
Description: OpenPGP digital signature