aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-11-30 15:40:22 -0800
committerBrian Behlendorf <[email protected]>2019-11-30 15:40:22 -0800
commitf348c78f97527e7a49859fa7e7ee29dd6b37dfb2 (patch)
tree13326692a8e8a94e37aad9fe88245563585beca3 /lib
parent77323bcf5361ded9ca6b8eb1fee77a8dfd34654c (diff)
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 <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #9633
Diffstat (limited to 'lib')
-rw-r--r--lib/libzpool/kernel.c4
1 files changed, 4 insertions, 0 deletions
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
}
/*