Skip to content

Commit

Permalink
check for sysctl before we use it
Browse files Browse the repository at this point in the history
Not all C libraries under Linux support the sysctl() func.
  • Loading branch information
vapier authored and nmathewson committed Dec 8, 2011
1 parent 1927776 commit 358c745
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arc4random.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 358c745

Please sign in to comment.