Skip to contentSkip to conversation

autoconf: Fix detection of sync_file_range.

PATCH In review Jim Schutt 2 participants 2 messages Apr 16, 2010

lore
Share & tools
lore

Jim Schutt

author
#0 lore raw

PATCH 1/1 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).

---
 configure.ac |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
configure.ac +1 -2
index 665fcdd..4abcbe1 100644
@@ -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.
Signature · 1 line
1.6.6.1
#1 lore raw

Thanks! This is pushed into unstable now. :)

Quoted 31 lines · Jim Schutt

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).

---
 configure.ac |    3 +--

 1 files changed, 1 insertions(+), 2 deletions(-)
configure.ac +1 -3
index 665fcdd..4abcbe1 100644
@@ -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.
--

1.6.6.1

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html