Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
am11 committed Jul 20, 2024
1 parent f71e7a2 commit e80c8dd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/native/libs/System.Native/pal_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,9 @@ int32_t SystemNative_MemfdSupported(void)
int32_t major, minor;

// memfd_create is only known to work properly on kernel version > 3.17 and throws SIGSEGV instead of ENOTSUP
if (sscanf(uts.release, "%d.%d", &major, &minor) == 2)
if (sscanf(uts.release, "%d.%d", &major, &minor) == 2 && major < 3 || (major == 3 && minor < 17))
{
if (major < 3 || (major == 3 && minor < 17)) {
return 0;
}
return 0;
}
#endif

Expand Down

0 comments on commit e80c8dd

Please sign in to comment.