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
better check for sysctl() availability #37
Conversation
Ooops I completely forgot to modify "device-linux.c" replacing HAVE_SYS_SYSCTL_H with HAVE_SYSCTL. |
Very cool! Thanks! I'll review in more detail when I get time. Seems like I had doubts about When you do a re-spin, please include a tid-bit about why sysctl is being Thanks in advance, On Wed, Nov 26, 2014 at 1:16 PM, Alexey Brodkin notifications@github.com
|
As it was mentioned before some Linux ports are dropping sysctl support. This is intentional move and in future versions of Linux kernel this system call will eventually go away. As a good alternative one may and should use procfs (/proc/sys). Currently we chech if corresponding header "sys/sysctl.h" exists. But the problem happens if libc in use still installs "sys/sysctl.h" header while provides no implementation for it. This is exactly the case with uClibc and probably other implementations of libc. But if we check for existing "sysctl" symbol in libc we're golden at least in compile-time because libc provides some stub at least. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Do you mean extended explanation about "sysctl" discontinuity in commit message of comment in code itself? |
Not an extended explanation. Any background info will do (and of course I Thanks in advance, On Wed, Nov 26, 2014 at 1:43 PM, Alexey Brodkin notifications@github.com
|
Oh, not a comment in the code. Commit message can be short and simple. On Wed, Nov 26, 2014 at 1:55 PM, Reuben Hawkins reubenhwk@gmail.com wrote:
|
Well, frankly I haven't been tracking this sysctl topic tightly. The only thing I know and for me this one is the most important that in UAPI headers which are a way to go for all architectures in Linux kernel and a must for new architectures "sysctl" syscall was put under __ARCH_WANT_SYSCALL_DEPRECATED ifdef: So technically it's still possible to enable it but the question is when this deprecated section will go away completely? |
Ok, so I added a change in "device-linux.c" replacing HAVE_SYS_SYSCTL_H with HAVE_SYSCTL and now if the patch looks good to you please consider applying. Thanks |
better check for sysctl() availability
I merged the request, but it didn't build on linux, so I reverted the On Wed, Nov 26, 2014 at 10:57 PM, Alexey Brodkin notifications@github.com
|
As it was mentioned before some Linux ports are dropping sysctl support.
But the problem happens if libc in use still installs "sys/sysctl.h" header
even if kernel doesn't support sysctl.
This is exactly the case with uClibc and probably other implementations of libc.
But if we check for existing "sysctl" symbol in libc we're golden at least in
compile-time because libc provides some stub at least.
Signed-off-by: Alexey Brodkin abrodkin@synopsys.com