summaryrefslogtreecommitdiff
path: root/src/unistd/getcwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/unistd/getcwd.c')
-rw-r--r--src/unistd/getcwd.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/unistd/getcwd.c b/src/unistd/getcwd.c
index e8e46a60..904e2c7d 100644
--- a/src/unistd/getcwd.c
+++ b/src/unistd/getcwd.c
@@ -1,20 +1,12 @@
-#include "stddef.h"
#include "sys/types.h"
#include <unistd.h>
-#include "errno.h"
#include "nonstd/assert.h"
#include "nonstd/syscall.h"
char * getcwd(char *buf, size_t size)
{
ASSERT_NONNULL(buf);
- SCNO(scno, "getcwd", NULL);
- int r = __libc.syscall(scno, buf, size);
- if (r < 0) {
- errno = -r;
- return NULL;
- }
- return buf;
+ SYSCALL("getcwd", char *, NULL, buf, size, 0, 0, 0, 0);
}
/*
POSIX(1)