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 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index a475fcc3225..7e6363c5aa7 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -6793,7 +6793,13 @@ NTSTATUS get_device_info( int fd, FILE_FS_DEVICE_INFORMATION *info ) break; #endif } - /* no special d_type for parallel ports */ + /* no special d_type for parallel ports */ + +#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 } } #endif