summaryrefslogtreecommitdiff
path: root/src/unistd/getcwd.c
blob: b64b560feeb5bf71d24f2354721a7b39d1f85004 (plain) (blame)
1
2
3
4
5
6
7
8
#include <unistd.h>
#include <errno.h>
#include "syscall.h"

char *getcwd(char *buf, size_t size)
{
	return syscall(SYS_getcwd, buf, size) < 0 ? NULL : buf;
}