From dd8fd1688a358758d5c9c605ddb1e87aedf2ade4 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 8 Apr 2012 20:58:59 -0700 Subject: [PATCH] configure: HAVE_FALLOCATE -> CEPH_HAVE_FALLOCATE /usr/include/linux/fs.h defines this on CentOS 5, even though it does not in fact compile. This stupid workaround avoids the problem. Reported-by: Nick Couchman Signed-off-by: Sage Weil --- configure.ac | 2 +- src/os/FileStore.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 6376c04f473d5..595c4fde25927 100644 --- a/configure.ac +++ b/configure.ac @@ -343,7 +343,7 @@ AC_CHECK_FUNC([sync_file_range], # fallocate AC_CHECK_FUNC([fallocate], - [AC_DEFINE([HAVE_FALLOCATE], [], [fallocate(2) is supported])], + [AC_DEFINE([CEPH_HAVE_FALLOCATE], [], [fallocate(2) is supported])], []) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 8f1c74708b7ec..83832cd3dbf5b 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -3040,7 +3040,7 @@ int FileStore::_zero(coll_t cid, const hobject_t& oid, uint64_t offset, size_t l dout(15) << "zero " << cid << "/" << oid << " " << offset << "~" << len << dendl; int ret = 0; -#ifdef HAVE_FALLOCATE +#ifdef CEPH_HAVE_FALLOCATE # if !defined(DARWIN) && !defined(__FreeBSD__) // first try to punch a hole. int fd = lfn_open(cid, oid, O_RDONLY); -- 2.39.5