Port: Add compat for dirfd
[babeltrace.git] / tests / lib / test_ctf_writer.c
index ce656b318c3320740bebbe0241a73de97750508c..eb4b1b4def548be74949a7124f210425a6cacf45 100644 (file)
@@ -37,7 +37,7 @@
 #include <unistd.h>
 #include <sys/wait.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <sys/wait.h>
 #include <fcntl.h>
-#include <dirent.h>
+#include <babeltrace/compat/dirent.h>
 #include "tap/tap.h"
 
 #define METADATA_LINE_SIZE 512
 #include "tap/tap.h"
 
 #define METADATA_LINE_SIZE 512
@@ -847,7 +847,7 @@ int main(int argc, char **argv)
        struct dirent *entry;
        while ((entry = readdir(trace_dir))) {
                if (entry->d_type == DT_REG) {
        struct dirent *entry;
        while ((entry = readdir(trace_dir))) {
                if (entry->d_type == DT_REG) {
-                       unlinkat(dirfd(trace_dir), entry->d_name, 0);
+                       unlinkat(bt_dirfd(trace_dir), entry->d_name, 0);
                }
        }
 
                }
        }
 
This page took 0.022948 seconds and 4 git commands to generate.