From 9eddf0b3cf11330ad41f6e9ff6cc4956c98ae7ba Mon Sep 17 00:00:00 2001 From: ValKmjolnir Date: Sat, 5 Mar 2022 19:24:33 +0800 Subject: [PATCH] try fix bug 'use of undeclared identifier 'environ'' on MacOS --- nasal_builtin.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nasal_builtin.h b/nasal_builtin.h index 536cfcb..50f7b24 100644 --- a/nasal_builtin.h +++ b/nasal_builtin.h @@ -1,5 +1,10 @@ #ifndef __NASAL_BUILTIN_H__ #define __NASAL_BUILTIN_H__ + +#if defined __APPLE__ +#include +#define environ (*_NSGetEnviron()) +#endif /* builtin functions must be called inside a function like this: var print=func(elems...){