]> granicus.if.org Git - strace/commitdiff
tests: fix build on systems that lack AT_FDCWD definition
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 26 Aug 2015 20:20:38 +0000 (20:20 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 26 Aug 2015 20:23:31 +0000 (20:23 +0000)
* tests/readlinkat.c: Stop including <fcntl.h>.
(main): Replace AT_FDCWD with -100.

tests/readlinkat.c

index a075d7038dd555ec885b1274e3cb5d4854f758f5..d22c49e4c53f97dad08a622f8b1863c3e5b16d28 100644 (file)
@@ -1,5 +1,4 @@
 #include <unistd.h>
-#include <fcntl.h>
 #include <sys/syscall.h>
 
 int
@@ -8,7 +7,7 @@ main(void)
 #ifdef __NR_readlinkat
        char buf[31];
 
-       if (syscall(__NR_readlinkat, AT_FDCWD, "readlinkat.link", buf, sizeof(buf)) != 12)
+       if (syscall(__NR_readlinkat, -100, "readlinkat.link", buf, sizeof(buf)) != 12)
                return 77;
 
        return 0;