From 1221e834f49adb91eb0b7443a57274f2611459c2 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Sat, 23 Feb 2019 15:22:33 -0500 Subject: compile in current environment --- src/unistd/getcwd.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/unistd/getcwd.c') 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 -#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) -- cgit v1.2.1