From d6b2a407783dbbd6c9680601da005de0bb0ff37d Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Mon, 17 Jun 2002 09:45:15 +0000 Subject: 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. --- libc/stdlib/setenv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libc/stdlib/setenv.c') 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 */ +#define _GNU_SOURCE #include #include #include @@ -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. */ -- cgit v1.2.3