* tests/readlink.c: New file. * tests/readlink.awk: Likewise. * tests/readlinkat.c: Likewise. * tests/readlinkat.awk: Likewise. * tests/readlink.test: New test. * tests/readlinkat.test: Likewise. * tests/Makefile.am (check_PROGRAMS): Add readlink and readlinkat. (TESTS): Add readlink.test and readlinkat.test. (EXTRA_DIST): Add readlink.awk and readlinkat.awk. * tests/.gitignore: Add readlink and readlinkat.
19 lines
257 B
C
19 lines
257 B
C
#include <unistd.h>
|
|
#include <fcntl.h>
|
|
#include <sys/syscall.h>
|
|
|
|
int
|
|
main(void)
|
|
{
|
|
#ifdef __NR_readlinkat
|
|
char buf[31];
|
|
|
|
if (syscall(__NR_readlinkat, AT_FDCWD, "readlinkat.link", buf, sizeof(buf)) != 12)
|
|
return 77;
|
|
|
|
return 0;
|
|
#else
|
|
return 77;
|
|
#endif
|
|
}
|