]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
autoconf: Fix detection of sync_file_range.
authorJim Schutt <jaschut@sandia.gov>
Fri, 16 Apr 2010 22:25:49 +0000 (16:25 -0600)
committerGreg Farnum <gregf@hq.newdream.net>
Fri, 16 Apr 2010 22:55:43 +0000 (15:55 -0700)
Without this patch, on CentOS 5.4 ./configure reports that
sync_file_range is missing, but HAVE_SYNC_FILE_RANGE ends
up being defined in src/acconfig.h anyway.

Compile tested on CentOS 5.4 (which does not have sync_file_range(2)
in distro glibc) and Fedora 11 (which does).

Signed-off-by: Jim Schutt <jaschut@sandia.gov>
configure.ac

index 665fcdd6281fea6f5bb7acb1c57f16e87f5cebe7..4abcbe128aca37f0308a2fdcfee65c323bf602db 100644 (file)
@@ -148,9 +148,8 @@ AC_CHECK_HEADER([openssl/md5.h],
 AC_CHECK_HEADERS([sys/xattr.h arpa/inet.h netdb.h netinet/in.h sys/file.h sys/ioctl.h sys/mount.h sys/param.h sys/socket.h sys/statvfs.h sys/time.h sys/vfs.h syslog.h utime.h])
 
 # sync_file_range
-AC_DEFINE([HAVE_SYNC_FILE_RANGE], [], [sync_file_range(2) is supported])
 AC_CHECK_FUNC([sync_file_range],
-       [AC_DEFINE([HAVE_SYNC_FILE_RANGE])],
+       [AC_DEFINE([HAVE_SYNC_FILE_RANGE], [], [sync_file_range(2) is supported])],
        [])
 
 # Checks for typedefs, structures, and compiler characteristics.