Fix the declaration of fstatat on macOS.

Was referencing the classic declaration that doesn't fit the current stat struct, leading to wrong stat results.
This commit is contained in:
Sönke Ludwig 2021-01-12 17:23:07 +01:00
parent df03416eea
commit d1273ca08b

View file

@ -1089,8 +1089,12 @@ version (Posix) {
extern(C) @safe nothrow @nogc { extern(C) @safe nothrow @nogc {
static if (!is(typeof(dirfd))) static if (!is(typeof(dirfd)))
int dirfd(DIR*); int dirfd(DIR*);
static if (!is(typeof(fstatat))) static if (!is(typeof(fstatat))) {
int fstatat(int dirfd, const(char)* pathname, stat_t *statbuf, int flags); version (OSX) {
pragma(mangle, "fstatat$INODE64")
int fstatat(int dirfd, const(char)* pathname, stat_t *statbuf, int flags);
} else int fstatat(int dirfd, const(char)* pathname, stat_t *statbuf, int flags);
}
} }
version (darwin) { version (darwin) {