From 079978c185c41a3d21bca22a24df712e35d70354 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 17 May 2024 18:05:10 -0400 Subject: dir: Use posix_getdents() on all platforms --- src/dir.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/dir.h b/src/dir.h index 6d5c9c5..bbba071 100644 --- a/src/dir.h +++ b/src/dir.h @@ -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 /** -- cgit v1.2.3