Skip to content

Commit

Permalink
ofstub.cc: fix environ for Apple
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 committed Dec 13, 2024
1 parent ddb726b commit 881965d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ofstd/libsrc/ofstub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ static OFString getLastErrorString()
return OFString();
}

#elif defined(__APPLE__)

#include <crt_externs.h>
#define environ (*_NSGetEnviron())

#else /* _WIN32 */

extern char** environ; // required to exist by the Single Unix Specification
Expand Down

0 comments on commit 881965d

Please sign in to comment.