summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2019-05-04 11:05:17 +0100
committerRoy Marples <roy@marples.name>2019-05-04 11:05:17 +0100
commit8b214d11b7c9bd57bcbae4f43d62a6359391dcd0 (patch)
tree94f79933c5fa66ea083f65ed295d0ca3a99f662e /configure
parent480d88cc9b843e14eacbaeaf751a5bf9ff0645ce (diff)
parent4ecd0553190666b1be927b286217eb56b5271629 (diff)
downloaddhcpcd-8b214d11b7c9bd57bcbae4f43d62a6359391dcd0.tar.xz
Merge branch 'master' into rbtree
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure b/configure
index cb57c4be..4a4920e2 100755
--- a/configure
+++ b/configure
@@ -14,6 +14,7 @@ INET6=
ARC4RANDOM=
CLOSEFROM=
RBTREE=
+CONSTTIME_MEMEQUAL=
STRLCPY=
UDEV=
OS=
@@ -848,6 +849,27 @@ if [ "$STRTOI" = no ]; then
echo "#include \"compat/strtoi.h\"" >>$CONFIG_H
fi
+if [ -z "$CONSTTIME_MEMEQUAL" ]; then
+ printf "Testing for consttime_memequal ... "
+ cat <<EOF >_consttime_memequal.c
+#include <string.h>
+int main(void) {
+ return consttime_memequal("deadbeef", "deadbeef", 8);
+}
+EOF
+ if $XCC _consttime_memequal.c -o _consttime_memequal 2>&3; then
+ CONSTTIME_MEMEQUAL=yes
+ else
+ CONSTTIME_MEMEQUAL=no
+ fi
+ echo "$CONSTTIME_MEMEQUAL"
+ rm -f _consttime_memequal.c _consttime_memequal
+fi
+if [ "$CONSTTIME_MEMEQUAL" = no ]; then
+ echo "#include \"compat/consttime_memequal.h\"" \
+ >>$CONFIG_H
+fi
+
if [ -z "$DPRINTF" ]; then
printf "Testing for dprintf ... "
cat <<EOF >_dprintf.c