fi
fi
-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 usleep nanosleep getdtablesize getrlimit sync_file_range posix_fadvise fallocate blkid_probe_get_topology mbstowcs
+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 usleep nanosleep getdtablesize getrlimit sync_file_range posix_fadvise fallocate fallocate64 blkid_probe_get_topology mbstowcs
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
AC_SEARCH_LIBS([blkid_probe_all], [blkid])
fi
dnl
-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 usleep nanosleep getdtablesize getrlimit sync_file_range posix_fadvise fallocate blkid_probe_get_topology mbstowcs)
+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 usleep nanosleep getdtablesize getrlimit sync_file_range posix_fadvise fallocate fallocate64 blkid_probe_get_topology mbstowcs)
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
}
#endif /* ! HAVE_SYNC_FILE_RANGE */
-#ifndef HAVE_FALLOCATE
+#ifndef HAVE_FALLOCATE64
#warning Using locally defined fallocate syscall interface.
#ifndef __NR_fallocate
#endif
/*
- * fallocate() - Manipulate file space.
+ * fallocate64() - Manipulate file space.
*
* @fd: defrag target file's descriptor.
* @mode: process flag.
* @offset: file offset.
* @len: file size.
*/
-static int fallocate(int fd, int mode, loff_t offset, loff_t len)
+static int fallocate64(int fd, int mode, loff_t offset, loff_t len)
{
return syscall(__NR_fallocate, fd, mode, offset, len);
}
/* Allocate space for donor inode */
orig_group_tmp = orig_group_head;
do {
- ret = fallocate(donor_fd, 0,
+ ret = fallocate64(donor_fd, 0,
(loff_t)orig_group_tmp->start->data.logical * block_size,
(loff_t)orig_group_tmp->len * block_size);
if (ret < 0) {