]> err.no Git - util-linux/commitdiff
build-sys: check for loff_t, it may not exist
authorFabian Groffen <grobian@gentoo.org>
Mon, 17 Jan 2011 20:04:04 +0000 (21:04 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 20 Jan 2011 21:40:58 +0000 (22:40 +0100)
On some systems, loff_t does not exist.  Define it as int64_t in that
case.

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
configure.ac
include/c.h

index 8922d1f68e23dfd2e6e3a6336b4e73d614a9c332..5b491f8ef7dc4168c747db27df4e37de32e5a837 100644 (file)
@@ -566,6 +566,7 @@ printf(__progname);
 AC_CHECK_TYPES([union semun], [], [], [[
 #include <sys/sem.h>
 ]])
+AC_CHECK_TYPES(loff_t)
 
 
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
index cfee616fbe0948095af5ae3ca79b0975d6d65d4a..83be3565c5b66760ef608557e1aab2bbd762afc7 100644 (file)
@@ -69,5 +69,9 @@ static inline __attribute__((const)) int is_power_of_2(unsigned long num)
        return (num != 0 && ((num & (num - 1)) == 0));
 }
 
+#ifndef HAVE_LOFF_T
+typedef int64_t loff_t;
+#endif
+
 
 #endif /* UTIL_LINUX_C_H */