From f782d4ea338923e5d4adf5d50cc294ff4c5d4ad6 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Sun, 10 Nov 2024 02:11:16 +0800 Subject: [PATCH] utility.cpp: fix lgamma_r for Darwin --- src/utility.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git src/utility.cpp src/utility.cpp index 14138a5..c949c6e 100644 --- src/utility.cpp +++ src/utility.cpp @@ -9,6 +9,12 @@ R package "ranger" under GPL3 license. #-------------------------------------------------------------------------------*/ +#ifdef __APPLE__ +#ifndef _REENTRANT +#define _REENTRANT // Some macOS versions require this for lgamma_r +#endif +#endif + #include #include #include