From e4193eff26a04437515cec2e16d32a75238a990e Mon Sep 17 00:00:00 2001 From: tb <> Date: Thu, 8 Aug 2024 03:46:50 +0000 Subject: hmac test: fix build with gcc The bounded attribute leads to failing regress compilation with gcc due to a test passing a negative length to exercise a chck. noticed and fixed suggested by claudio --- src/regress/lib/libcrypto/hmac/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/regress/lib/libcrypto/hmac/Makefile b/src/regress/lib/libcrypto/hmac/Makefile index 6705336211..19ec43dce0 100644 --- a/src/regress/lib/libcrypto/hmac/Makefile +++ b/src/regress/lib/libcrypto/hmac/Makefile @@ -1,9 +1,15 @@ -# $OpenBSD: Makefile,v 1.3 2014/07/08 15:53:52 jsing Exp $ +# $OpenBSD: Makefile,v 1.4 2024/08/08 03:46:50 tb Exp $ + +.include PROG= hmactest LDADD= -lcrypto DPADD= ${LIBCRYPTO} WARNINGS= Yes -CFLAGS+= -DLIBRESSL_INTERNAL -Werror +CFLAGS+= -DLIBRESSL_INTERNAL +# The bounded attribute for HMAC_Init_ex() warns for gcc, breaking compilation +.if ${COMPILER_VERSION:L} == "clang" +CFLAGS+= -Werror +.endif .include -- cgit v1.2.3-55-g6feb