]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Explicitly check for ftruncate64() in configure.in
authorTheodore Ts'o <tytso@mit.edu>
Mon, 21 Jan 2008 18:45:00 +0000 (13:45 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 21 Jan 2008 18:45:00 +0000 (13:45 -0500)
Apparently Mac OS 10.5 defines fstat64(), but not ftruncate64(),
causing resize2fs to fail to build.  So check explicitly for
ftruncate64(), and fall back to ftruncate() if necessary.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
configure
configure.in
resize/main.c

index 4ab9e94377d8dbfb783051fbe179727c21d6fe23..6cda01c05766660598c1dbf99a343896eb5699d9 100755 (executable)
--- a/configure
+++ b/configure
@@ -14860,7 +14860,8 @@ fi
 
 
 
-for ac_func in chflags getrusage llseek lseek64 open64 fstat64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid
+
+for ac_func in chflags getrusage llseek lseek64 open64 fstat64 ftruncate64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { echo "$as_me:$LINENO: checking for $ac_func" >&5
index 12baa6b062a8b275535305279be675732387158b..799015d27a90e73b340ac746ba4afa6690642720 100644 (file)
@@ -747,7 +747,7 @@ AC_CHECK_MEMBER(struct sockaddr.sa_len,
        [#include <sys/types.h>
         #include <sys/socket.h>])
 dnl
-AC_CHECK_FUNCS(chflags getrusage llseek lseek64 open64 fstat64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid)
+AC_CHECK_FUNCS(chflags getrusage llseek lseek64 open64 fstat64 ftruncate64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid)
 dnl
 dnl Check to see if -lsocket is required (solaris) to make something
 dnl that uses socket() to compile; this is needed for the UUID library
index b3f80f7e6490d6198cbf7420bc0c032635c0cdb7..f283e412349d28aa323b67a758b0870cb178b4b5 100644 (file)
@@ -413,7 +413,7 @@ int main (int argc, char ** argv)
 
        if ((st_buf.st_size > new_file_size) &&
            (fd > 0)) {
-#ifdef HAVE_FSTAT64
+#ifdef HAVE_FTRUNCATE64
                ftruncate64(fd, new_file_size);
 #else
                /* Only truncate if new_file_size doesn't overflow off_t */