diff options
| -rw-r--r-- | configure.ac | 3 | ||||
| -rw-r--r-- | include/compat/unistd.h | 4 | ||||
| -rw-r--r-- | m4/check-libc.m4 | 17 |
3 files changed, 16 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index d02b3d4..c103399 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -49,7 +49,8 @@ AM_CONDITIONAL([BUILD_CERTHASH], [test "x$ac_cv_func_symlink" = xyes]) | |||
| 49 | AC_CHECK_FUNC([funopen]) | 49 | AC_CHECK_FUNC([funopen]) |
| 50 | 50 | ||
| 51 | CHECK_LIBC_COMPAT | 51 | CHECK_LIBC_COMPAT |
| 52 | CHECK_LIBC_CRYPTO_COMPAT | 52 | CHECK_SYSCALL_COMPAT |
| 53 | CHECK_CRYPTO_COMPAT | ||
| 53 | CHECK_VA_COPY | 54 | CHECK_VA_COPY |
| 54 | CHECK_B64_NTOP | 55 | CHECK_B64_NTOP |
| 55 | 56 | ||
diff --git a/include/compat/unistd.h b/include/compat/unistd.h index 5dc2908..758512b 100644 --- a/include/compat/unistd.h +++ b/include/compat/unistd.h | |||
| @@ -29,4 +29,8 @@ unsigned int sleep(unsigned int seconds); | |||
| 29 | int getentropy(void *buf, size_t buflen); | 29 | int getentropy(void *buf, size_t buflen); |
| 30 | #endif | 30 | #endif |
| 31 | 31 | ||
| 32 | #ifndef HAVE_TAME | ||
| 33 | #define tame(request, paths) | ||
| 34 | #endif | ||
| 35 | |||
| 32 | #endif | 36 | #endif |
diff --git a/m4/check-libc.m4 b/m4/check-libc.m4 index 63fd893..2e3e820 100644 --- a/m4/check-libc.m4 +++ b/m4/check-libc.m4 | |||
| @@ -2,14 +2,11 @@ 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 | # Check for general libc functions | 4 | # Check for general libc functions |
| 5 | AC_CHECK_FUNCS([accept4 asprintf inet_pton memmem poll]) | 5 | AC_CHECK_FUNCS([asprintf inet_pton memmem readpassphrase reallocarray]) |
| 6 | AC_CHECK_FUNCS([readpassphrase reallocarray]) | ||
| 7 | AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strsep strtonum]) | 6 | AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strsep strtonum]) |
| 8 | AM_CONDITIONAL([HAVE_ACCEPT4], [test "x$ac_cv_func_accept4" = xyes]) | ||
| 9 | AM_CONDITIONAL([HAVE_ASPRINTF], [test "x$ac_cv_func_asprintf" = xyes]) | 7 | AM_CONDITIONAL([HAVE_ASPRINTF], [test "x$ac_cv_func_asprintf" = xyes]) |
| 10 | AM_CONDITIONAL([HAVE_INET_PTON], [test "x$ac_cv_func_inet_pton" = xyes]) | 8 | AM_CONDITIONAL([HAVE_INET_PTON], [test "x$ac_cv_func_inet_pton" = xyes]) |
| 11 | AM_CONDITIONAL([HAVE_MEMMEM], [test "x$ac_cv_func_memmem" = xyes]) | 9 | AM_CONDITIONAL([HAVE_MEMMEM], [test "x$ac_cv_func_memmem" = xyes]) |
| 12 | AM_CONDITIONAL([HAVE_POLL], [test "x$ac_cv_func_poll" = xyes]) | ||
| 13 | AM_CONDITIONAL([HAVE_READPASSPHRASE], [test "x$ac_cv_func_readpassphrase" = xyes]) | 10 | AM_CONDITIONAL([HAVE_READPASSPHRASE], [test "x$ac_cv_func_readpassphrase" = xyes]) |
| 14 | AM_CONDITIONAL([HAVE_REALLOCARRAY], [test "x$ac_cv_func_reallocarray" = xyes]) | 11 | AM_CONDITIONAL([HAVE_REALLOCARRAY], [test "x$ac_cv_func_reallocarray" = xyes]) |
| 15 | AM_CONDITIONAL([HAVE_STRLCAT], [test "x$ac_cv_func_strlcat" = xyes]) | 12 | AM_CONDITIONAL([HAVE_STRLCAT], [test "x$ac_cv_func_strlcat" = xyes]) |
| @@ -20,6 +17,13 @@ AM_CONDITIONAL([HAVE_STRSEP], [test "x$ac_cv_func_strsep" = xyes]) | |||
| 20 | AM_CONDITIONAL([HAVE_STRTONUM], [test "x$ac_cv_func_strtonum" = xyes]) | 17 | AM_CONDITIONAL([HAVE_STRTONUM], [test "x$ac_cv_func_strtonum" = xyes]) |
| 21 | ]) | 18 | ]) |
| 22 | 19 | ||
| 20 | AC_DEFUN([CHECK_SYSCALL_COMPAT], [ | ||
| 21 | AC_CHECK_FUNCS([accept4 poll tame]) | ||
| 22 | AM_CONDITIONAL([HAVE_ACCEPT4], [test "x$ac_cv_func_accept4" = xyes]) | ||
| 23 | AM_CONDITIONAL([HAVE_POLL], [test "x$ac_cv_func_poll" = xyes]) | ||
| 24 | AM_CONDITIONAL([HAVE_TAME], [test "x$ac_cv_func_tame" = xyes]) | ||
| 25 | ]) | ||
| 26 | |||
| 23 | AC_DEFUN([CHECK_B64_NTOP], [ | 27 | AC_DEFUN([CHECK_B64_NTOP], [ |
| 24 | AC_SEARCH_LIBS([b64_ntop],[resolv]) | 28 | AC_SEARCH_LIBS([b64_ntop],[resolv]) |
| 25 | AC_SEARCH_LIBS([__b64_ntop],[resolv]) | 29 | AC_SEARCH_LIBS([__b64_ntop],[resolv]) |
| @@ -38,9 +42,8 @@ AC_CACHE_CHECK([for b64_ntop], ac_cv_have_b64_ntop_arg, [ | |||
| 38 | AM_CONDITIONAL([HAVE_B64_NTOP], [test "x$ac_cv_func_b64_ntop" = xyes]) | 42 | AM_CONDITIONAL([HAVE_B64_NTOP], [test "x$ac_cv_func_b64_ntop" = xyes]) |
| 39 | ]) | 43 | ]) |
| 40 | 44 | ||
| 41 | 45 | AC_DEFUN([CHECK_CRYPTO_COMPAT], [ | |
| 42 | AC_DEFUN([CHECK_LIBC_CRYPTO_COMPAT], [ | 46 | # Check crypto-related libc functions and syscalls |
| 43 | # Check crypto-related libc functions | ||
| 44 | AC_CHECK_FUNCS([arc4random_buf explicit_bzero getauxval getentropy]) | 47 | AC_CHECK_FUNCS([arc4random_buf explicit_bzero getauxval getentropy]) |
| 45 | AC_CHECK_FUNCS([timingsafe_bcmp timingsafe_memcmp]) | 48 | AC_CHECK_FUNCS([timingsafe_bcmp timingsafe_memcmp]) |
| 46 | AM_CONDITIONAL([HAVE_ARC4RANDOM_BUF], [test "x$ac_cv_func_arc4random_buf" = xyes]) | 49 | AM_CONDITIONAL([HAVE_ARC4RANDOM_BUF], [test "x$ac_cv_func_arc4random_buf" = xyes]) |
