Whamcloud - gitweb
b=20139 prevent parent thread to be killed before its child becoming daemon
[fs/lustre-release.git] / libsysio / tests / test_getcwd.c
index 8cd160d..fb56c24 100644 (file)
 #include <sys/uio.h>
 #include <sys/queue.h>
 #include <dirent.h>
+#include <getopt.h>
 
+#if defined(SYSIO_LABEL_NAMES)
+#include "sysio.h"
+#endif
 #include "xtio.h"
 #include "mount.h"
 
@@ -144,11 +148,11 @@ doit(const char *path)
 {
        char    *buf;
 
-       if (chdir(path) != 0) {
+       if (SYSIO_INTERFACE_NAME(chdir)(path) != 0) {
                perror(path);
                return -1;
        }
-       buf = getcwd(NULL, 0);
+       buf = SYSIO_INTERFACE_NAME(getcwd)(NULL, 0);
        if (!buf) {
                perror(path);
                return -1;