From: "Chip Davis" Subject: Re: [PATCH 2/2] ntdll: Replace fstat and lstat with fstatat in get_file_info. Message-Id: <1f910eaf4bfd319b538c7483edbde428@codeweavers.com> Date: Mon, 30 Aug 2021 19:43:47 +0000 In-Reply-To: References: <75ec9457c4bc96bb2150421429176610@codeweavers.com> August 30, 2021 2:32 PM, "Erich E. Hoover" wrote: > On Sat, Aug 28, 2021 at 11:40 PM Chip Davis wrote: > >> August 29, 2021 12:18 AM, "Dean Greer" wrote: >> Are you referring to a runtime issue?, since a later SDK has been needed from wine-5.8. >> Yes. That function will be weak-linked, which means that on 10.8 and 10.9 it will be NULL. Calling >> it without checking for NULL will cause a crash on those systems. > > I was obviously expecting this to not be a problem since fstatat is > already used in fd_is_mount_point(), is there an existing example of > how we like to work around a function that's weak-linked and possibly > NULL? See lines 92-96 of dlls/ntdll/unix/sync.c. Though in this case, I don't think that method will be acceptable here, since mach_continuous_time() is unique to macOS and is used in macOS-specific code, while fstatat(2) is a standard POSIX function used in code compiled everywhere. Chip