mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 17:35:06 -05:00
configure: check for nettle_memeql_sec()
This fixes build with nettle versions before 3.3.
This commit is contained in:
7
configure
vendored
7
configure
vendored
@@ -898,6 +898,13 @@ if [ $feat_sechash = "1" ] && [ "x$HASH_LINK" = "x" ] && [ $try_nettle = "1" ];
|
||||
EXTRA_OBJECTS="$EXTRA_OBJECTS cmac_nettle.o"
|
||||
EXTRA_CLI_OBJECTS="$EXTRA_CLI_OBJECTS cmac_nettle.o"
|
||||
fi
|
||||
|
||||
if test_code 'nettle_memeql_sec()' 'nettle/memops.h' \
|
||||
"$test_cflags" "$test_link" \
|
||||
'return nettle_memeql_sec("", "", 0);'
|
||||
then
|
||||
add_def HAVE_NETTLE_MEMEQL
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
4
util.c
4
util.c
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "sysincl.h"
|
||||
|
||||
#if defined(HAVE_NETTLE)
|
||||
#if defined(HAVE_NETTLE_MEMEQL)
|
||||
#include <nettle/memops.h>
|
||||
#elif defined(HAVE_GNUTLS)
|
||||
#include <gnutls/gnutls.h>
|
||||
@@ -1660,7 +1660,7 @@ UTI_SplitString(char *string, char **words, int max_saved_words)
|
||||
int
|
||||
UTI_IsMemoryEqual(const void *s1, const void *s2, unsigned int len)
|
||||
{
|
||||
#if defined(HAVE_NETTLE)
|
||||
#if defined(HAVE_NETTLE_MEMEQL)
|
||||
return nettle_memeql_sec(s1, s2, len);
|
||||
#elif defined(HAVE_GNUTLS)
|
||||
return gnutls_memcmp(s1, s2, len) == 0;
|
||||
|
||||
Reference in New Issue
Block a user