diff options
author | Jonas 'Sortie' Termansen <sortie@maxsi.org> | 2021-10-03 13:33:16 +0200 |
---|---|---|
committer | Jonas 'Sortie' Termansen <sortie@maxsi.org> | 2021-10-03 13:33:16 +0200 |
commit | fcf6c877881626ee2ac94fc77051c79e3f7ae7ce (patch) | |
tree | 7634390a1cac4c517bae21b9e8b212949c27bc2f /m4 | |
parent | 691c7c7514c1f46e7d40619c4833094bd1c24571 (diff) | |
download | portable-fcf6c877881626ee2ac94fc77051c79e3f7ae7ce.tar.gz portable-fcf6c877881626ee2ac94fc77051c79e3f7ae7ce.tar.bz2 portable-fcf6c877881626ee2ac94fc77051c79e3f7ae7ce.zip |
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.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/check-libc.m4 | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/m4/check-libc.m4 b/m4/check-libc.m4 index e511f6d..cca97c3 100644 --- a/m4/check-libc.m4 +++ b/m4/check-libc.m4 | |||
@@ -1,6 +1,7 @@ | |||
1 | AC_DEFUN([CHECK_LIBC_COMPAT], [ | 1 | AC_DEFUN([CHECK_LIBC_COMPAT], [ |
2 | # Check for libc headers | 2 | # Check for libc headers |
3 | AC_CHECK_HEADERS([err.h readpassphrase.h]) | 3 | AC_CHECK_HEADERS([err.h readpassphrase.h]) |
4 | AC_CHECK_HEADERS([arpa/nameser.h endian.h netinet/ip.h resolv.h]) | ||
4 | # Check for general libc functions | 5 | # Check for general libc functions |
5 | AC_CHECK_FUNCS([asprintf freezero memmem]) | 6 | AC_CHECK_FUNCS([asprintf freezero memmem]) |
6 | AC_CHECK_FUNCS([readpassphrase reallocarray recallocarray]) | 7 | AC_CHECK_FUNCS([readpassphrase reallocarray recallocarray]) |
@@ -9,10 +10,7 @@ AC_CHECK_FUNCS([timegm _mkgmtime timespecsub]) | |||
9 | AC_CHECK_FUNCS([getprogname syslog syslog_r]) | 10 | AC_CHECK_FUNCS([getprogname syslog syslog_r]) |
10 | AC_CACHE_CHECK([for getpagesize], ac_cv_func_getpagesize, [ | 11 | AC_CACHE_CHECK([for getpagesize], ac_cv_func_getpagesize, [ |
11 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ | 12 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
12 | // Since Android NDK v16 getpagesize is defined as inline inside unistd.h | 13 | #include <unistd.h> |
13 | #ifdef __ANDROID__ | ||
14 | # include <unistd.h> | ||
15 | #endif | ||
16 | ]], [[ | 14 | ]], [[ |
17 | getpagesize(); | 15 | getpagesize(); |
18 | ]])], | 16 | ]])], |