move msghdr and cmsghdr out of bits/socket.h
[musl.git] / src / env / clearenv.c
blobdb8e8e94b8e0c5cef544216129bebe724a4f6d85
1 #define _GNU_SOURCE
2 #include <stdlib.h>
3 #include <unistd.h>
5 static void dummy(char *old, char *new) {}
6 weak_alias(dummy, __env_rm_add);
8 int clearenv()
10 char **e = __environ;
11 __environ = 0;
12 if (e) while (*e) __env_rm_add(*e++, 0);
13 return 0;