* sysdeps/generic/dl-environ.c: Include <stdlib.h> and <unistd.h>,
and don't declare unsetenv or _environ directly.
(unsetenv): Return int, not void. Use __environ instead of _environ.
02111-1307 USA. */
#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
#include <ldsodefs.h>
-extern char **_environ;
-extern void unsetenv (const char *name);
-
/* Walk through the environment of the process and return all entries
starting with `LD_'. */
char *
return result;
}
-void
+int
unsetenv (const char *name)
{
const size_t len = strlen (name);
char **ep;
- ep = _environ;
+ ep = __environ;
while (*ep != NULL)
if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
{
}
else
++ep;
+
+ return 0;
}