From d4b46660cb70765879286bd8d9af51ce05cbb021 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Tue, 30 Jan 2024 18:12:28 +0100 Subject: [PATCH] Workaround fdatasync bug on macOS Fix: https://github.com/Shopify/bootsnap/issues/470 --- ext/bootsnap/bootsnap.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/bootsnap/bootsnap.c b/ext/bootsnap/bootsnap.c index 7526d37..75f96fb 100644 --- a/ext/bootsnap/bootsnap.c +++ b/ext/bootsnap/bootsnap.c @@ -21,6 +21,12 @@ #include #include +#ifdef __APPLE__ + // The symbol is present, however not in the headers + // See: https://github.com/Shopify/bootsnap/issues/470 + extern int fdatasync(int); +#endif + #ifndef O_NOATIME #define O_NOATIME 0 #endif