From a0b341deb503e704105f407c4224415e43922477 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...){