Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/cxong/tinydir.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLautis Sun <lautis0503@gmail.com>2021-11-17 17:15:42 +0300
committerGitHub <noreply@github.com>2021-11-17 17:15:42 +0300
commit4acafe7916720645bf65e19be8603acfe7acdba1 (patch)
treeebdbd607475ae258cab222733c991f6ee28c6877
parent99f75ca4dfa36a9c7d4f971da0e44ae3f30e202f (diff)
parentdaf125f265724a2713445b94e7a06e973184ba12 (diff)
Merge pull request #70 from cxong/lstat_bugfix1.2.5
Use lstat() for macOS and *BSD (bug fix)
-rw-r--r--tinydir.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tinydir.h b/tinydir.h
index bd76d28..ba20c3e 100644
--- a/tinydir.h
+++ b/tinydir.h
@@ -548,7 +548,9 @@ int tinydir_readfile(const tinydir_dir *dir, tinydir_file *file)
if (_tstat(
#elif (defined _BSD_SOURCE) || (defined _DEFAULT_SOURCE) \
|| ((defined _XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)) \
- || ((defined _POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L))
+ || ((defined _POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L)) \
+ || ((defined __APPLE__) && (defined __MACH__)) \
+ || (defined BSD)
if (lstat(
#else
if (stat(