From 3655115e5a3c50fc06afd801100a9d75d813fd2b Mon Sep 17 00:00:00 2001 From: dzwdz Date: Wed, 19 Oct 2022 14:23:14 +0200 Subject: user/libc: BSD err.h, getprogname() --- src/user/lib/stdlib.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/user/lib/stdlib.c') diff --git a/src/user/lib/stdlib.c b/src/user/lib/stdlib.c index ffa9f15..5d1b09f 100644 --- a/src/user/lib/stdlib.c +++ b/src/user/lib/stdlib.c @@ -8,6 +8,14 @@ _Noreturn void abort(void) { _syscall_exit(1); } +static const char *progname; +const char *getprogname(void) { + return progname; +} +void setprogname(const char *pg) { + progname = pg; +} + int mkstemp(char *template) { // TODO randomize template handle_t h = camellia_open(template, OPEN_CREATE | OPEN_RW); -- cgit v1.2.3