static void create_sparse_file(const char *, const struct sparse *);
-#if defined(__APPLE__)
-/* On APFS holes need to be at least 4096x4097 bytes */
-#define MIN_HOLE 16781312
-#else
-/* Elsewhere we work with 4096*10 bytes */
-#define MIN_HOLE 409600
-#endif
+/* This should be large enough that any OS/filesystem that
+ * does support sparse files is certain to store a gap this big
+ * as a hole. */
+/* A few data points:
+ * = ZFS on FreeBSD needs this to be at least 200kB
+ * = macOS APFS needs this to be at least 4096x4097 bytes
+ *
+ * 32MiB here is bigger than either of the above.
+ */
+#define MIN_HOLE (32 * 1024UL * 1024UL)
#if defined(_WIN32) && !defined(__CYGWIN__)
#include <winioctl.h>