#include <sys/stat.h>
#include <fcntl.h>
#include <sys/mman.h>
-#include <dirent.h>
+#include <babeltrace/compat/dirent.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
perror("opendir");
goto error_rmdir;
}
- dir_fd = dirfd(dir);
+ dir_fd = bt_dirfd(dir);
if (dir_fd < 0) {
perror("dirfd");
goto error_closedir;