]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Use lseek() instead of llseek() of sizeof(long) == sizeof(long long)
authorTheodore Ts'o <tytso@mit.edu>
Sun, 27 Jan 2008 05:35:32 +0000 (00:35 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 27 Jan 2008 05:35:32 +0000 (00:35 -0500)
Previously we used a hard-coded test where for the Alpha and the IA64,
we used lseek instead of llseek().  Generalize this to whenver
sizeof(long) is the same as sizeof(long long).

It turns out this fixes a FTBFS problem on the x86_64 for Debian,
since dietlibc doesn't provide llseek() on that architecture.

Addresses-Debian-Bug: #459614

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/blkid/llseek.c
lib/ext2fs/llseek.c

index 4f49052e535b4e03e8e0aef79bebd042410981fb..5bd0e516782a81bb99ebbadbebc033a01d076a24 100644 (file)
@@ -45,11 +45,11 @@ extern long long llseek(int fd, long long offset, int origin);
 
 #else  /* ! HAVE_LLSEEK */
 
-#if defined(__alpha__) || defined(__ia64__)
+#if SIZEOF_LONG == SIZEOF_LONG_LONG
 
 #define llseek lseek
 
-#else /* !__alpha__ && !__ia64__*/
+#else /* SIZEOF_LONG != SIZEOF_LONG_LONG */
 
 #include <linux/unistd.h>
 
index aa4f54d4c3589b85bdb2145ce8d96e0043d99fa2..5a5e560bb5b48e6a212e8fac9bd9b40d06d424f1 100644 (file)
@@ -46,11 +46,11 @@ extern long long llseek (int fd, long long offset, int origin);
 
 #else  /* ! HAVE_LLSEEK */
 
-#if defined(__alpha__) || defined (__ia64__)
+#if SIZEOF_LONG == SIZEOF_LONG_LONG
 
 #define llseek lseek
 
-#else /* !__alpha__ && !__ia64__*/
+#else /* SIZEOF_LONG != SIZEOF_LONG_LONG */
 
 #include <linux/unistd.h>