mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Check for auxv.h and hwcap.h before including them.
uClibc-ng does not provide <sys/auxv.h>, and a non-Linux-kernel-based Unixlike system running on Arm will probably not provide <asm/hwcap.h>. Now we check for both of those headers at autoconf time, and if either one is absent, we don't do the runtime test for Arm crypto acceleration. This should only make a difference on systems where this module previously failed to compile at all. But obviously it would be nicer to find alternative ways to check for crypto acceleration on such systems; patches welcome.
This commit is contained in:
parent
94f955fa90
commit
235f5bf8ae
@ -175,6 +175,7 @@ AC_CHECK_LIB(X11, XOpenDisplay,
|
||||
|
||||
AC_CHECK_FUNCS([getaddrinfo posix_openpt ptsname setresuid strsignal updwtmpx fstatat dirfd futimes])
|
||||
AC_CHECK_DECLS([CLOCK_MONOTONIC], [], [], [[#include <time.h>]])
|
||||
AC_CHECK_HEADERS([sys/auxv.h asm/hwcap.h])
|
||||
AC_SEARCH_LIBS([clock_gettime], [rt], [AC_DEFINE([HAVE_CLOCK_GETTIME],[],[Define if clock_gettime() is available])])
|
||||
|
||||
AC_CACHE_CHECK([for SO_PEERCRED and dependencies], [x_cv_linux_so_peercred], [
|
||||
|
@ -1,6 +1,8 @@
|
||||
#include "putty.h"
|
||||
#include "ssh.h"
|
||||
|
||||
#if defined __linux__ && (defined __arm__ || defined __aarch64__)
|
||||
#if defined __linux__ && (defined __arm__ || defined __aarch64__) && \
|
||||
HAVE_SYS_AUXV_H && HAVE_ASM_HWCAP_H
|
||||
|
||||
#include <sys/auxv.h>
|
||||
#include <asm/hwcap.h>
|
||||
|
Loading…
Reference in New Issue
Block a user