From a4041d76eb3589d20f38bcc7332674566321f698 Mon Sep 17 00:00:00 2001 From: barracuda156 Date: Sun, 6 Aug 2023 10:50:56 +0800 Subject: [PATCH] Fix environ define for Apple --- src/Corrade/Utility/Arguments.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git src/Corrade/Utility/Arguments.cpp src/Corrade/Utility/Arguments.cpp index cfd0c877..75188cd2 100644 --- src/Corrade/Utility/Arguments.cpp +++ src/Corrade/Utility/Arguments.cpp @@ -41,7 +41,12 @@ /* For Arguments::environment() */ #if defined(CORRADE_TARGET_UNIX) || defined(CORRADE_TARGET_EMSCRIPTEN) #include +#ifdef __APPLE__ +#include +#define environ (*_NSGetEnviron()) +#else extern char **environ; +#endif #ifdef CORRADE_TARGET_EMSCRIPTEN #include #endif -- 2.41.0