diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-05-17 18:05:10 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-05-17 18:05:10 -0400 |
commit | 079978c185c41a3d21bca22a24df712e35d70354 (patch) | |
tree | b86453c7c036cac1047923d55439a035e605a5a4 /src/dir.h | |
parent | 8fbfb0b973b1ff8307f7c29e6e8facb7e0f72ea0 (diff) | |
download | bfs-079978c185c41a3d21bca22a24df712e35d70354.tar.xz |
dir: Use posix_getdents() on all platforms
Diffstat (limited to 'src/dir.h')
-rw-r--r-- | src/dir.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -15,8 +15,12 @@ * Whether the implementation uses the getdents() syscall directly, rather than * libc's readdir(). */ -#if !defined(BFS_USE_GETDENTS) && (__linux__ || __FreeBSD__) -# define BFS_USE_GETDENTS (BFS_HAS_GETDENTS || BFS_HAS_GETDENTS64 | BFS_HAS_GETDENTS64_SYSCALL) +#ifndef BFS_USE_GETDENTS +# if BFS_HAS_POSIX_GETDENTS +# define BFS_USE_GETDENTS true +# elif __linux__ || __FreeBSD__ +# define BFS_USE_GETDENTS (BFS_HAS_GETDENTS || BFS_HAS_GETDENTS64 | BFS_HAS_GETDENTS64_SYSCALL) +# endif #endif /** |