config.cpp: fix environ for Apple

This commit is contained in:
Sergey Fedorov 2024-03-24 10:10:11 +08:00
parent a2f3942114
commit eabd4dcb26
No known key found for this signature in database
GPG key ID: 3397EF66A7275D91

View file

@ -10,7 +10,13 @@
#include <cstring>
using namespace Hyprlang;
#ifdef __APPLE__
#include <crt_externs.h>
#define environ (*_NSGetEnviron())
#else
extern "C" char** environ;
#endif
// defines
inline constexpr const char* ANONYMOUS_KEY = "__hyprlang_internal_anonymous_key";