Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Don't use statfs on Apple systems, as for them it returns version-spe…
…cific file system ids.
  • Loading branch information
adamsitnik committed Aug 24, 2022
commit 715b5aa14eb500f00a5324813734d7fefcc80c75
3 changes: 2 additions & 1 deletion src/native/libs/System.Native/pal_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1481,7 +1481,8 @@ static int16_t ConvertLockType(int16_t managedLockType)

uint32_t SystemNative_GetFileSystemType(intptr_t fd)
{
#if HAVE_STATFS_VFS || HAVE_STATFS_MOUNT
// Don't use statfs on Apple systems, as for them it returns version-specific file system ids.
#if (HAVE_STATFS_VFS || HAVE_STATFS_MOUNT) && !(defined(__APPLE__) && !HAVE_NON_LEGACY_STATFS)
int statfsRes;
struct statfs statfsArgs;
// for our needs (get file system type) statfs is always enough and there is no need to use statfs64
Expand Down