fix(c/os): add missing clearenv for macOS

This commit is contained in:
Aofei Sheng
2024-08-03 09:55:25 +08:00
parent 0bd259403c
commit 4b568fc469
4 changed files with 59 additions and 4 deletions

9
c/os/_os/os.c Normal file
View File

@@ -0,0 +1,9 @@
#include <stdlib.h>
int llgo_clearenv() {
extern char **environ;
if (environ != NULL) {
*environ = NULL;
}
return 0;
}