From: John Szakmeister john@szakmeister.net
macOS doesn't have a way to detect this via the FIODTYPE ioctl(), so we have to resort to detecting the NUL device via major and minor device number. Fortunately, that hasn't changed since the inception of macOS.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55568 --- dlls/ntdll/unix/file.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index a475fcc3225..f45858290b7 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -6793,6 +6793,13 @@ NTSTATUS get_device_info( int fd, FILE_FS_DEVICE_INFORMATION *info ) break; #endif } + +#if defined(__APPLE__) + /* /dev/null on has been 3, 2 since the start of OSX */ + if (d_type == D_DISK && major(st.st_rdev) == 3 && minor(st.st_rdev) == 2) + info->DeviceType = FILE_DEVICE_NULL; +#endif + /* no special d_type for parallel ports */ } }