diff options
author | Lautis Sun <lautis0503@gmail.com> | 2021-11-11 18:34:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-11 18:34:31 +0300 |
commit | daf125f265724a2713445b94e7a06e973184ba12 (patch) | |
tree | a4096e55fdb52c8d6597bf213c3f78a6d9b9d657 | |
parent | 64fb1d4376d7580aa1013fdbacddbbeba67bb085 (diff) |
Use lstat() for macOS and *BSD (bug fix)lstat_bugfix
Refer to issue #63. Thanks to @wojdyr.
-rw-r--r-- | tinydir.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -543,7 +543,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( |