Whamcloud - gitweb
LU-633 iokit: mds-survey script for MD echo client test
[fs/lustre-release.git] / libsysio / tests / test_link.c
index 218dd49..317bc5e 100644 (file)
 #endif
 #include <sys/uio.h>
 #include <sys/queue.h>
+#include <getopt.h>
 
+#if defined(SYSIO_LABEL_NAMES)
+#include "sysio.h"
+#endif
 #include "xtio.h"
 #include "test.h"
 
@@ -106,11 +110,11 @@ main(int argc, char *const argv[])
 
                old = argv[optind++];
                new = argv[optind++];
-               if ((err = link(old, new)) != 0) {
+               if ((err = SYSIO_INTERFACE_NAME(link)(old, new)) != 0) {
                        perror("link");
                        break;
                }
-               if ((err = lstat(new, &stbuf)) != 0) {
+               if ((err = SYSIO_INTERFACE_NAME(lstat)(new, &stbuf)) != 0) {
                        perror(new);
                        break;
                }