#include <sys/stat.h>
#include <fcntl.h>
-// from include/linux/falloc.h:
-#ifndef FALLOC_FL_PUNCH_HOLE
-# define FALLOC_FL_PUNCH_HOLE 0x2
+#ifdef __linux__
+#include <linux/falloc.h>
#endif
#include "FS.h"
#include "XFS.h"
#endif
-#if defined(DARWIN) || defined(__FreeBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
#include <sys/mount.h>
#else
#include <sys/vfs.h>
int from_fd,
uint64_t from_offset, uint64_t from_len)
{
- assert(0 == "write me");
+ ceph_abort_msg("write me");
}
int FS::zero(int fd, uint64_t offset, uint64_t length)
So: we only do this is PUNCH_HOLE *and* KEEP_SIZE are defined.
*/
-#if !defined(DARWIN) && !defined(__FreeBSD__)
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
# ifdef CEPH_HAVE_FALLOCATE
# ifdef FALLOC_FL_KEEP_SIZE
// first try fallocate