try to fix MAC compilation #40 : workaround ambiguous 'environ' global variable availability

This commit is contained in:
Garux 2020-04-04 21:09:36 +03:00
parent ab80efd198
commit a7de623115

View File

@ -672,6 +672,11 @@ void Exit(){
#else
#include <spawn.h>
#endif
// Apple may not provide the environ global variable
#if defined(__APPLE__) && !defined(environ)
#include <crt_externs.h>
#define environ (*_NSGetEnviron())
#endif
void Radiant_Restart(){
ConfirmModified( "Restart Radiant" ); // user can choose to not save, it's ok