xref: /netbsd-src/tests/lib/libc/ssp/h_getcwd2.c (revision ccd9df534e375a4366c5b55f23782053c7a98d82)
1 #include <err.h>
2 #include <errno.h>
3 #include <unistd.h>
4 
5 char*
6 getcwd(char* buf, size_t buflen)
7 {
8        errno = ENOSYS;
9        return NULL;
10 }
11 int
12 main(void)
13 {
14        char buf[256];
15        if (getcwd(buf, sizeof buf) == NULL)
16                err(1, "getcwd failed");
17        return 0;
18 }
19