From 640fa83406bb8c08d971be68b32b7e222e92e286 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 10 Nov 2023 22:22:01 -0500 Subject: Initial support for Cosmopolitan Libc --- src/eval.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/eval.c') diff --git a/src/eval.c b/src/eval.c index eb4a0ca..6aa5104 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1558,7 +1558,9 @@ static const char *dump_bftw_strategy(enum bftw_strategy strategy) { /** Check if we need to enable BFTW_BUFFER. */ static bool eval_must_buffer(const struct bfs_expr *expr) { -#if __FreeBSD__ +#if __COSMOPOLITAN__ + return true; +#elif __FreeBSD__ // FreeBSD doesn't properly handle adding/removing directory entries // during readdir() on NFS mounts. Work around it by passing BFTW_BUFFER // whenever we could be mutating the directory ourselves through -delete -- cgit v1.2.3