check for sysctl before we use it

Not all C libraries under Linux support the sysctl() func.
This commit is contained in:
Mike Frysinger 2011-12-08 11:39:48 -05:00 committed by Nick Mathewson
parent 19277763b2
commit 358c745e54
2 changed files with 2 additions and 2 deletions

View File

@ -166,7 +166,7 @@ arc4_seed_win32(void)
}
#endif
#if defined(_EVENT_HAVE_SYS_SYSCTL_H)
#if defined(_EVENT_HAVE_SYS_SYSCTL_H) && defined(_EVENT_HAVE_SYSCTL)
#if _EVENT_HAVE_DECL_CTL_KERN && _EVENT_HAVE_DECL_KERN_RANDOM && _EVENT_HAVE_DECL_RANDOM_UUID
#define TRY_SEED_SYSCTL_LINUX
static int

View File

@ -267,7 +267,7 @@ AC_HEADER_TIME
dnl Checks for library functions.
AC_CHECK_FUNCS([gettimeofday vasprintf fcntl clock_gettime strtok_r strsep])
AC_CHECK_FUNCS([getnameinfo strlcpy inet_ntop inet_pton signal sigaction strtoll inet_aton pipe eventfd sendfile mmap splice arc4random arc4random_buf issetugid geteuid getegid getprotobynumber setenv unsetenv putenv])
AC_CHECK_FUNCS([getnameinfo strlcpy inet_ntop inet_pton signal sigaction strtoll inet_aton pipe eventfd sendfile mmap splice arc4random arc4random_buf issetugid geteuid getegid getprotobynumber setenv unsetenv putenv sysctl])
AC_CACHE_CHECK(
[for getaddrinfo],