From: Fabian Groffen Date: Mon, 17 Jan 2011 20:04:04 +0000 (+0100) Subject: build-sys: check for loff_t, it may not exist X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5be1c0330b8ba239a7a25ff6ec840e3316ef68c7;p=util-linux build-sys: check for loff_t, it may not exist On some systems, loff_t does not exist. Define it as int64_t in that case. Signed-off-by: Fabian Groffen --- diff --git a/configure.ac b/configure.ac index 8922d1f6..5b491f8e 100644 --- a/configure.ac +++ b/configure.ac @@ -566,6 +566,7 @@ printf(__progname); AC_CHECK_TYPES([union semun], [], [], [[ #include ]]) +AC_CHECK_TYPES(loff_t) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ diff --git a/include/c.h b/include/c.h index cfee616f..83be3565 100644 --- a/include/c.h +++ b/include/c.h @@ -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 */