From 47effc4bd39e4e13c59102bab3e789783725ecb6 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 22 Sep 2022 09:25:35 +0200 Subject: [PATCH] unix: remove pre-macos 10.8 compatibility hack (#3759) --- src/unix/fs.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/unix/fs.c b/src/unix/fs.c index 933c9c0d..902cd772 100644 --- a/src/unix/fs.c +++ b/src/unix/fs.c @@ -527,19 +527,12 @@ done: } -#if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_8) -#define UV_CONST_DIRENT uv__dirent_t -#else -#define UV_CONST_DIRENT const uv__dirent_t -#endif - - -static int uv__fs_scandir_filter(UV_CONST_DIRENT* dent) { +static int uv__fs_scandir_filter(const uv__dirent_t* dent) { return strcmp(dent->d_name, ".") != 0 && strcmp(dent->d_name, "..") != 0; } -static int uv__fs_scandir_sort(UV_CONST_DIRENT** a, UV_CONST_DIRENT** b) { +static int uv__fs_scandir_sort(const uv__dirent_t** a, const uv__dirent_t** b) { return strcmp((*a)->d_name, (*b)->d_name); }