diff options
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/getprogname.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/setprogname.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc/gen/getprogname.c b/lib/libc/gen/getprogname.c index 54f721a..7edf998 100644 --- a/lib/libc/gen/getprogname.c +++ b/lib/libc/gen/getprogname.c @@ -3,6 +3,8 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* LIBC_RCS and not lint */ +#include <stdlib.h> + extern const char *__progname; const char * diff --git a/lib/libc/gen/setprogname.c b/lib/libc/gen/setprogname.c index 341e910..2ddceef 100644 --- a/lib/libc/gen/setprogname.c +++ b/lib/libc/gen/setprogname.c @@ -3,6 +3,7 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* LIBC_RCS and not lint */ +#include <stdlib.h> #include <string.h> extern const char *__progname; @@ -10,7 +11,7 @@ extern const char *__progname; void setprogname(const char *progname) { - char *p; + const char *p; p = strrchr(progname, '/'); __progname = p ? p + 1 : progname; |