summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortb <tb@openbsd.org>2020-11-09 16:05:10 +0000
committertb <tb@openbsd.org>2020-11-09 16:05:10 +0000
commit4bf4727a1e68b54750cae1e696592bd6c40381d1 (patch)
tree2cce337f26ba926490a3c2c69d0b3e7724b26453
parentFix compiler warnings about missing prototypes. (diff)
downloadwireguard-openbsd-4bf4727a1e68b54750cae1e696592bd6c40381d1.tar.xz
wireguard-openbsd-4bf4727a1e68b54750cae1e696592bd6c40381d1.zip
One more missing prototype
-rw-r--r--regress/usr.sbin/rpki-client/Makefile.inc3
-rw-r--r--regress/usr.sbin/rpki-client/openssl11/Makefile12
2 files changed, 13 insertions, 2 deletions
diff --git a/regress/usr.sbin/rpki-client/Makefile.inc b/regress/usr.sbin/rpki-client/Makefile.inc
index 21cc566f245..4c11a7e63d7 100644
--- a/regress/usr.sbin/rpki-client/Makefile.inc
+++ b/regress/usr.sbin/rpki-client/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.2 2020/11/09 15:53:42 tb Exp $
+# $OpenBSD: Makefile.inc,v 1.3 2020/11/09 16:05:10 tb Exp $
.PATH: ${.CURDIR}/../../../../usr.sbin/rpki-client
@@ -29,6 +29,7 @@ run-regress-test-cert: test-cert
./test-cert -v ${.CURDIR}/../cer/*.cer
./test-cert -vt ${TALARGS:S,,${.CURDIR}/../&,}
+# Provide missing prototypes for OpenSSL
mft_gen.c: mft.c
echo '#include <openssl/asn1.h>\n' > $@.tmp
echo 'int ASN1_time_parse(const char *, size_t, struct tm *, int);' \
diff --git a/regress/usr.sbin/rpki-client/openssl11/Makefile b/regress/usr.sbin/rpki-client/openssl11/Makefile
index 3153d5809f8..9481fa80e74 100644
--- a/regress/usr.sbin/rpki-client/openssl11/Makefile
+++ b/regress/usr.sbin/rpki-client/openssl11/Makefile
@@ -2,7 +2,17 @@ LDADD += -Wl,-rpath,/usr/local/lib/eopenssl11 -L/usr/local/lib/eopenssl11
CFLAGS += -I/usr/local/include/eopenssl11/
# For mft.c we need ASN1_time_parse() and ASN1_time_tm_cmp() from LibreSSL
-SRCS_test-mft = a_time_tm.c o_time.c
+
+# Provide a missing prototype
+a_time_tm_gen.c: a_time_tm.c
+ echo '#include <openssl/asn1.h>\n' > $@.tmp
+ echo 'void ASN1error(int);' >> $@.tmp
+ cat $> >> $@.tmp
+ mv -f $@.tmp $@
+
+CLEANFILES += a_time_tm_gen.c a_time_tm_gen.c.tmp
+
+SRCS_test-mft = a_time_tm_gen.c o_time.c
CFLAGS += -I${.CURDIR}/../../../../lib/libcrypto/
.PATH: ${.CURDIR}/..