Commit d668820dc885669b7d87b08041fe5ff7cb396098

Jacques Germishuys 2019-05-24T10:48:47

NetBSD < 7 doesn't have posix_fallocate See: https://www.netbsd.org/changes/changes-7.0.html

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/posix.c b/src/posix.c
index b5dfac5..32ca704 100644
--- a/src/posix.c
+++ b/src/posix.c
@@ -157,7 +157,7 @@ int p_rename(const char *from, const char *to)
 
 int p_fallocate(int fd, off_t offset, off_t len)
 {
-#ifdef __APPLE__
+#if defined (__APPLE__) || (defined (__NetBSD__) && __NetBSD_Version__ < 700000000)
 	fstore_t prealloc;
 	struct stat st;
 	size_t newsize;