35 static inline int __attribute__ ((nonnull (2)))
41 fd = openat(base, dirname, O_PATH | O_DIRECTORY | O_CLOEXEC);
42 #elif defined(O_SEARCH)
43 fd = openat(base, dirname, O_SEARCH | O_DIRECTORY | O_CLOEXEC);
45 fd = openat(base, dirname, O_RDONLY | O_DIRECTORY | O_CLOEXEC);
53 if (fstat(fd, &st) != 0) {
60 if (!S_ISDIR(st.st_mode)) {
static int get_dirfd(int base, const char *dirname)
get a file descriptor for the given directory
Definition: diropen.h:36