Package: sg-utils
Version: 1.02-3
Severity: normal
Tags: patch

Hi,

Attached is the diff for my sg-utils 1.02-3.1 NMU.
diff -Nru /tmp/8MXoNZZD4S/sg-utils-1.02/debian/changelog 
/tmp/5ELv7J2Dpk/sg-utils-1.02/debian/changelog
--- /tmp/8MXoNZZD4S/sg-utils-1.02/debian/changelog      2006-11-02 
15:18:47.000000000 +0100
+++ /tmp/5ELv7J2Dpk/sg-utils-1.02/debian/changelog      2006-11-02 
15:18:47.000000000 +0100
@@ -1,3 +1,11 @@
+sg-utils (1.02-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Adapt to new syscall usage; fixes FTBFS with kernels >= 2.6.18, patch
+    from Ted Percival. (Closes: #394853)
+
+ -- Steinar H. Gunderson <[EMAIL PROTECTED]>  Thu,  2 Nov 2006 15:14:00 +0100
+
 sg-utils (1.02-3) unstable; urgency=low
 
   * Fixes typo in postinst script (Closes: #354957)
diff -Nru /tmp/8MXoNZZD4S/sg-utils-1.02/llseek.c 
/tmp/5ELv7J2Dpk/sg-utils-1.02/llseek.c
--- /tmp/8MXoNZZD4S/sg-utils-1.02/llseek.c      2000-12-09 00:50:02.000000000 
+0100
+++ /tmp/5ELv7J2Dpk/sg-utils-1.02/llseek.c      2006-11-02 15:18:47.000000000 
+0100
@@ -24,30 +24,21 @@
 
 #ifdef __linux__
 
-#ifdef HAVE_LLSEEK
-#include <syscall.h>
-
-#else  /* HAVE_LLSEEK */
-
 #if defined(__alpha__) || defined(__ia64__)
 
 #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 SYS__llseek
 
-#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)
+#define _llseek(fd, offset_high, offset_low, result, origin) \
+       syscall(SYS__llseek, fd, offset_high, offset_low, result, origin)
 
 #else
 
-/* 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) {
@@ -71,8 +62,6 @@
 
 #endif /* __alpha__ */
 
-#endif /* HAVE_LLSEEK */
-
 llse_loff_t llse_llseek (unsigned int fd, llse_loff_t offset,
                         unsigned int origin)
 {

Reply via email to