diff options
author | Manuel Novoa III <mjn3@codepoet.org> | 2002-06-17 09:45:15 +0000 |
---|---|---|
committer | Manuel Novoa III <mjn3@codepoet.org> | 2002-06-17 09:45:15 +0000 |
commit | d6b2a407783dbbd6c9680601da005de0bb0ff37d (patch) | |
tree | d72244507fab5c5c59d12aa10fa411943631c56c /libc/stdlib/setenv.c | |
parent | a7ce5bbdcd1217af1aab4c15e4ce337c8ef33973 (diff) |
Commit the new time stuff, even though I haven't made it threadsafe yet.
At least people can play with it. Also, fix a buglet in setenv.c.
Diffstat (limited to 'libc/stdlib/setenv.c')
-rw-r--r-- | libc/stdlib/setenv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/stdlib/setenv.c b/libc/stdlib/setenv.c index 02959ab95..ef5d84d81 100644 --- a/libc/stdlib/setenv.c +++ b/libc/stdlib/setenv.c @@ -19,6 +19,7 @@ modified for uClibc by Erik Andersen <andersen@codepoet.org> */ +#define _GNU_SOURCE #include <features.h> #include <errno.h> #include <stdlib.h> @@ -56,7 +57,7 @@ int __add_to_environ (const char *name, const char *value, const size_t namelen = strlen (name); const size_t vallen = value != NULL ? strlen (value) + 1 : 0; - pthread_mutex_lock(&envlock); + LOCK; /* We have to get the pointer now that we have the lock and not earlier since another thread might have created a new environment. */ |