summaryrefslogtreecommitdiff
path: root/libc/stdlib
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2002-06-17 09:45:15 +0000
committerManuel Novoa III <mjn3@codepoet.org>2002-06-17 09:45:15 +0000
commitd6b2a407783dbbd6c9680601da005de0bb0ff37d (patch)
treed72244507fab5c5c59d12aa10fa411943631c56c /libc/stdlib
parenta7ce5bbdcd1217af1aab4c15e4ce337c8ef33973 (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')
-rw-r--r--libc/stdlib/setenv.c3
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. */