-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
warning: sysctl is not implemented and will always fail #890
Comments
It's a fallback that is typically never attempted on linux: arc4_seed(void)
{
int ok = 0;
/* We try every method that might work, and don't give up even if one
* does seem to work. There's no real harm in over-seeding, and if
* one of these sources turns out to be broken, that would be bad. */
#ifdef TRY_SEED_WIN32
if (0 == arc4_seed_win32())
ok = 1;
#endif
#ifdef TRY_SEED_URANDOM
if (0 == arc4_seed_urandom())
ok = 1;
#endif
#ifdef TRY_SEED_PROC_SYS_KERNEL_RANDOM_UUID
if (arc4random_urandom_filename == NULL &&
0 == arc4_seed_proc_sys_kernel_random_uuid())
ok = 1;
#endif
#ifdef TRY_SEED_SYSCTL_LINUX
/* Apparently Linux is deprecating sysctl, and spewing warning
* messages when you try to use it. */
if (!ok && 0 == arc4_seed_sysctl_linux())
ok = 1;
#endif So if Anyway, that sysctl strategy should probably be replaced by |
Replaced with |
very nice, thanks @azat By the way, OpenBSD and MacOS have a But |
There are some issues on osx sierra at least (see #398), so let's keep it as-is for now, to avoid introducing yet another build switch. |
Since sysctl() is deprecated for a long-long time, according to sysctl(2): Since Linux 2.6.24, uses of this system call result in warnings in the kernel log. Fixes: libevent#890 Suggested-by: Pierce Lopez (cherry picked from commit 86f55b0)
Hi,
When i build the libevent, there is always a warning. Just like that:
I check the document carefully. I found that the official doc does not suggest using the "sysctl" function:
http://man7.org/linux/man-pages/man2/sysctl.2.html
They suggest that "Glibc does not provide a wrapper for this system call; call it using syscall(2)."
Is any one encounter this problem ?
Configurations:
OS:Ubuntu 18.04
Kernel: 4.18.20
arch: aarch64
The text was updated successfully, but these errors were encountered: