-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
posix: check glibc version for ::close_range function #378
base: develop
Are you sure you want to change the base?
Conversation
Moreover, I've just noticed that kernel version also checked wrong.
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0) |
…close_range syscall support
@klemens-morgenstern I've noticed that you pushed the fix to you devel branch, but you haven't provided option to fully disable close_range usage, as I understood. In case we build on new kernel, BUT with old glibc (for extended compatibility) the whole program will break, because of ENOTSUP error (a.k.a Unsupported system call). |
ac43b71
to
58586e4
Compare
On old systems with old glibc, but new kernel (the common case is build in CI on ancient OS with old glibc for extended compatibility) there may not be
::close_range()
function. In this case build will fail.To avoid that we should properly check not only linux kernel version, but glibc version too.
There is one another option to solve this issue is use raw system call with only checking kernel version, but it seems to me dirty solution.