Skip to content

Commit

Permalink
Merge pull request #70 from cxong/lstat_bugfix
Browse files Browse the repository at this point in the history
Use lstat() for macOS and *BSD (bug fix)
  • Loading branch information
lautis0503 authored Nov 17, 2021
2 parents 99f75ca + daf125f commit 4acafe7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tinydir.h
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 4acafe7

Please sign in to comment.