int __setxid(int, int, int, int);
extern char **__environ;
-#define environ __environ
#undef weak_alias
#define weak_alias(old, new) \
#include <errno.h>
#include <limits.h>
-extern char **environ;
+extern char **__environ;
int __execvpe(const char *file, char *const argv[], char *const envp[])
{
int execvp(const char *file, char *const argv[])
{
- return __execvpe(file, argv, environ);
+ return __execvpe(file, argv, __environ);
}
weak_alias(dummy_0, __acquire_ptc);
weak_alias(dummy_0, __release_ptc);
-extern char **environ;
+extern char **__environ;
int system(const char *cmd)
{
posix_spawnattr_setsigdefault(&attr, &reset);
posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETSIGDEF|POSIX_SPAWN_SETSIGMASK);
ret = posix_spawn(&pid, "/bin/sh", 0, &attr,
- (char *[]){"sh", "-c", (char *)cmd, 0}, environ);
+ (char *[]){"sh", "-c", (char *)cmd, 0}, __environ);
posix_spawnattr_destroy(&attr);
if (!ret) while (waitpid(pid, &status, 0)<0 && errno == EINTR);