Support operating systems without some non-POSIX headers
The arpa/nameser.h, netinet/ip.h, and resolv.h headers are not crucial to building LibreSSL. The netinet/ip.h header is used in nc(1) for optional IPTOS_ features that can be ifdef'd on systems without support. The endian.h header is the upcoming standard header and should be used whenever available and correct. The machine/endian.h header is non-standard and doesn't have to exist on POSIX systems. Fix the check for getpagesize(3) not forward declaring the function, such that CFLAGS with -Werror=implicit-function-declaration doesn't cause the check to fail.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
AC_DEFUN([CHECK_LIBC_COMPAT], [
|
||||
# Check for libc headers
|
||||
AC_CHECK_HEADERS([err.h readpassphrase.h])
|
||||
AC_CHECK_HEADERS([arpa/nameser.h endian.h netinet/ip.h resolv.h])
|
||||
# Check for general libc functions
|
||||
AC_CHECK_FUNCS([asprintf freezero memmem])
|
||||
AC_CHECK_FUNCS([readpassphrase reallocarray recallocarray])
|
||||
@@ -9,10 +10,7 @@ AC_CHECK_FUNCS([timegm _mkgmtime timespecsub])
|
||||
AC_CHECK_FUNCS([getprogname syslog syslog_r])
|
||||
AC_CACHE_CHECK([for getpagesize], ac_cv_func_getpagesize, [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
// Since Android NDK v16 getpagesize is defined as inline inside unistd.h
|
||||
#ifdef __ANDROID__
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
]], [[
|
||||
getpagesize();
|
||||
]])],
|
||||
|
Reference in New Issue
Block a user