From f348c78f97527e7a49859fa7e7ee29dd6b37dfb2 Mon Sep 17 00:00:00 2001 From: Matthew Macy Date: Sat, 30 Nov 2019 15:40:22 -0800 Subject: Mark Linux fallocate extensions as specific to Linux fallocate(2) is a Linux-specific system call which in unavailable on other platforms. Reviewed-by: Jorgen Lundman Reviewed-by: Brian Behlendorf Signed-off-by: Matt Macy Closes #9633 --- lib/libzpool/kernel.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/libzpool') diff --git a/lib/libzpool/kernel.c b/lib/libzpool/kernel.c index 6123b5d6a..cd6553eeb 100644 --- a/lib/libzpool/kernel.c +++ b/lib/libzpool/kernel.c @@ -1346,7 +1346,11 @@ zfs_file_fsync(zfs_file_t *fp, int flags) int zfs_file_fallocate(zfs_file_t *fp, int mode, loff_t offset, loff_t len) { +#ifdef __linux__ return (fallocate(fp->f_fd, mode, offset, len)); +#else + return (EOPNOTSUPP); +#endif } /* -- cgit v1.2.3