Репозитории ALT
S: | 9.4.0-alt2 |
D: | 4.0.0-alt0.1.rc4 |
5.1: | 4.0.15-alt4.M51.1 |
4.1: | 3.0.17-alt4 |
4.0: | 3.0.17-alt2.M40.1 |
3.0: | 1.3.22pl4-alt3 |
+backports: | 3.0.17-alt3.M30 |
Группа :: Система/Серверы
Пакет: dhcpcd
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: compat-Provide-consttime_memequal-if-not-in-libc.patch
Скачать
Скачать
From cfde89ab66cb4e5957b1c4b68ad6a9449e2784da Mon Sep 17 00:00:00 2001
From: Roy Marples <roy@marples.name>
Date: Fri, 19 Apr 2019 21:42:07 +0100
Subject: [PATCH] compat: Provide consttime_memequal if not in libc
Public domain version by Matthias Drochner <drochner@netbsd.org>
---
configure | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/configure b/configure
index 570e65f2..4f58f0f3 100755
--- a/configure
+++ b/configure
@@ -13,6 +13,7 @@ IPV4LL=
INET6=
ARC4RANDOM=
CLOSEFROM=
+CONSTTIME_MEMEQUAL=
STRLCPY=
UDEV=
OS=
@@ -846,6 +847,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
--
2.21.0