From e20566d3ad456ef241ca154f37b2bc602ab81689 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Thu, 20 May 2021 16:29:52 +0100 Subject: [PATCH] Only use punchchole in Darwin/Mac OS X if present when compiled. --- setter/src/unix/darwin/sparse.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setter/src/unix/darwin/sparse.c b/setter/src/unix/darwin/sparse.c index 649c615..b389bd1 100644 --- a/setter/src/unix/darwin/sparse.c +++ b/setter/src/unix/darwin/sparse.c @@ -34,6 +34,7 @@ Copyright (C) 2011-2021 Natalia Portillo int DarwinSparse(const char* path) { +#ifdef F_PUNCHHOLE int ret; int rc, wRc, cRc, sRc; FILE* h; @@ -148,4 +149,7 @@ int DarwinSparse(const char* path) sRc); return done; +#else + return -1; +#endif }