diff --git a/include/stdlib.h b/include/stdlib.h index 592a387b..f388a194 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -46,7 +46,7 @@ void exit (int status); void free (void *ptr); char *getenv (char const *s); int setenv (char const *s, char const *v, int overwrite_p); -void unsetenv (char const *name); +int unsetenv (char const *name); void *malloc (size_t); void qsort (void *base, size_t nmemb, size_t size, int (*compar) (void const *, void const *)); int rand (void); diff --git a/lib/posix/unsetenv.c b/lib/posix/unsetenv.c index 726f6267..b81fe324 100644 --- a/lib/posix/unsetenv.c +++ b/lib/posix/unsetenv.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright © 2018 Jan (janneke) Nieuwenhuizen + * Copyright © 2018,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -22,7 +22,7 @@ #include #include -void +int unsetenv (char const *name) { int length = strlen (name); @@ -38,4 +38,5 @@ unsetenv (char const *name) } p++; } + return 0; }