This stops a compile on the macos.
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/ntdll/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index 1a5f86d7c2..fd2f17dc72 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -139,7 +139,7 @@ static inline ULONG get_file_attributes( const struct stat *st ) static BOOL fd_is_mount_point( int fd, const struct stat *st ) { struct stat parent; - return S_ISDIR( st->st_mode ) && !fstatat( fd, "..", &parent, 0 ) + return S_ISDIR( st->st_mode ) && !lstat( "..", &parent) && (parent.st_dev != st->st_dev || parent.st_ino == st->st_ino); }
On 3/23/20 9:07 PM, Alistair Leslie-Hughes wrote:
- return S_ISDIR( st->st_mode ) && !fstatat( fd, "..", &parent, 0 )
- return S_ISDIR( st->st_mode ) && !lstat( "..", &parent)
These aren't the same. For relative paths, fstatat takes it as relative to the directory indicated by 'fd', whereas lstat takes it as relative to the current working directory. Also, fstatat goes through symlinks by default, whereas lstat doesn't (not likely to be an issue for '..', but technically different nonetheless).
March 23, 2020 11:08 PM, "Alistair Leslie-Hughes" leslie_alistair@hotmail.com wrote:
This stops a compile on the macos.
Is someone actually using an old (10.9 or lower) SDK to build this? (fstatat(2) was added in Mac OS 10.10.)
Chip
Hi Chip
On 24/3/20 4:01 pm, Chip Davis wrote:
March 23, 2020 11:08 PM, "Alistair Leslie-Hughes" leslie_alistair@hotmail.com wrote:
This stops a compile on the macos.
Is someone actually using an old (10.9 or lower) SDK to build this? (fstatat(2) was added in Mac OS 10.10.)
Yes, the build box uses an older SDK.
Maybe Sebastian or Michael can comment, if it can be updated?
Alistair.
Besides the fact that compiling for an older SDK increases the number of versions where the build works, I believe that Sebastian encountered problems with the compiler for the newer versions that were available at the time he put together the build system together. It's been a while, but if I recall correctly, someone brought the issue to Apple's attention and it's been fixed in newer releases. So, it may be that if you update to something "new enough" that that will fix this issue without breaking everything.
Best, Erich
On Mon, Mar 23, 2020, 11:11 PM Alistair Leslie-Hughes < leslie_alistair@hotmail.com> wrote:
Hi Chip
On 24/3/20 4:01 pm, Chip Davis wrote:
March 23, 2020 11:08 PM, "Alistair Leslie-Hughes" <
leslie_alistair@hotmail.com> wrote:
This stops a compile on the macos.
Is someone actually using an old (10.9 or lower) SDK to build this?
(fstatat(2) was added in Mac OS 10.10.)
Yes, the build box uses an older SDK.
Maybe Sebastian or Michael can comment, if it can be updated?
Alistair.