/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 <Nick.Couchman@seakr.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
# fallocate
AC_CHECK_FUNC([fallocate],
- [AC_DEFINE([HAVE_FALLOCATE], [], [fallocate(2) is supported])],
+ [AC_DEFINE([CEPH_HAVE_FALLOCATE], [], [fallocate(2) is supported])],
[])
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);