summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortobhe <tobhe@cvs.openbsd.org>2021-01-03 18:05:22 +0000
committertobhe <tobhe@cvs.openbsd.org>2021-01-03 18:05:22 +0000
commit6d0e9cbf073f6e967dce20fa2c36cc304fc48ead (patch)
tree832b268bbc74d3f0d4d52d71fc69b6e07a22913c
parentcf6781d2ee630db64d939f2e76189c0803ee0b2c (diff)
Prevent redefinition of `crypto_int32' error with gcc3.
Fixes compilation on luna88k. Feedback millert@ Found by and ok aoyama@
-rw-r--r--usr.bin/ssh/sntrup761.c3
-rw-r--r--usr.bin/ssh/sntrup761.sh5
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/sntrup761.c b/usr.bin/ssh/sntrup761.c
index 61f6bb353c9..19ab4a4c60c 100644
--- a/usr.bin/ssh/sntrup761.c
+++ b/usr.bin/ssh/sntrup761.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sntrup761.c,v 1.2 2020/12/30 14:13:28 tobhe Exp $ */
+/* $OpenBSD: sntrup761.c,v 1.3 2021/01/03 18:05:21 tobhe Exp $ */
/*
* Public Domain, Authors:
@@ -156,7 +156,6 @@ typedef int16_t int16;
#define int32_divmod_uint14 CRYPTO_NAMESPACE(int32_divmod_uint14)
-typedef int32_t int32;
/*
assuming 1 <= m < 16384:
diff --git a/usr.bin/ssh/sntrup761.sh b/usr.bin/ssh/sntrup761.sh
index 5ddea77a05a..3ab303ab7c2 100644
--- a/usr.bin/ssh/sntrup761.sh
+++ b/usr.bin/ssh/sntrup761.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: sntrup761.sh,v 1.2 2020/12/30 14:13:28 tobhe Exp $
+# $OpenBSD: sntrup761.sh,v 1.3 2021/01/03 18:05:21 tobhe Exp $
# Placed in the Public Domain.
#
AUTHOR="supercop-20201130/crypto_kem/sntrup761/ref/implementors"
@@ -60,6 +60,7 @@ for i in $FILES; do
-v '#include' $i | \
sed -e "s/crypto_kem_/crypto_kem_sntrup761_/g" \
-e "s/^extern void /static void /" \
- -e "s/^void /static void /"
+ -e "s/^void /static void /" \
+ -e "/^typedef int32_t int32;$/d"
echo
done