try fix bug 'use of undeclared identifier 'environ'' on MacOS

This commit is contained in:
ValKmjolnir 2022-03-05 19:24:33 +08:00
parent d3df356299
commit a0b341deb5
1 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,10 @@
#ifndef __NASAL_BUILTIN_H__
#define __NASAL_BUILTIN_H__
#if defined __APPLE__
#include <crt_externs.h>
#define environ (*_NSGetEnviron())
#endif
/*
builtin functions must be called inside a function like this:
var print=func(elems...){