From 0b44a0315b47dd8eced9f3b7f31580cf14bbfc01 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sat, 12 Feb 2011 00:22:29 -0500 Subject: initial check-in, version 0.5.0 --- src/unistd/getcwd.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/unistd/getcwd.c (limited to 'src/unistd/getcwd.c') diff --git a/src/unistd/getcwd.c b/src/unistd/getcwd.c new file mode 100644 index 00000000..4910f42c --- /dev/null +++ b/src/unistd/getcwd.c @@ -0,0 +1,8 @@ +#include +#include +#include "syscall.h" + +char *getcwd(char *buf, size_t size) +{ + return syscall2(__NR_getcwd, (long)buf, size) < 0 ? NULL : buf; +} -- cgit v1.2.3-70-g09d2