diff options
author | dzwdz | 2022-10-19 14:23:14 +0200 |
---|---|---|
committer | dzwdz | 2022-10-19 14:23:14 +0200 |
commit | 3655115e5a3c50fc06afd801100a9d75d813fd2b (patch) | |
tree | c9d4f39608d19d0a4b0b886d70d9b86463a59d60 /src/user/lib/stdlib.c | |
parent | 753d43d349bfde6b83cff650c9354c4a0442a3ae (diff) |
user/libc: BSD err.h, getprogname()
Diffstat (limited to 'src/user/lib/stdlib.c')
-rw-r--r-- | src/user/lib/stdlib.c | 8 |
1 files changed, 8 insertions, 0 deletions
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); |