From: Jim Schutt Date: Fri, 16 Apr 2010 22:25:49 +0000 (-0600) Subject: autoconf: Fix detection of sync_file_range. X-Git-Tag: v0.20~45 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=65ec0241ab5e9232fe9d0acde9595c211be5c96d;p=ceph.git autoconf: Fix detection of sync_file_range. 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 --- diff --git a/configure.ac b/configure.ac index 665fcdd6281f..4abcbe128aca 100644 --- a/configure.ac +++ b/configure.ac @@ -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.