git: c907302c121a - main - zstream: Downgrade -Watomic-alignment to a warning

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Tue, 06 Oct 2026 02:45:35 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=c907302c121acc5ed696544f86a6d44d07faf06c

commit c907302c121acc5ed696544f86a6d44d07faf06c
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-10-05 20:53:19 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-10-06 02:35:14 +0000

    zstream: Downgrade -Watomic-alignment to a warning
    
    Don't complain about unaligned atomic operations on i386.  This
    same approach is already used for libspl.
---
 cddl/usr.bin/zstream/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/cddl/usr.bin/zstream/Makefile b/cddl/usr.bin/zstream/Makefile
index 0562e6545056..545716a6ec56 100644
--- a/cddl/usr.bin/zstream/Makefile
+++ b/cddl/usr.bin/zstream/Makefile
@@ -1,3 +1,6 @@
+.include <bsd.init.mk>
+.include <bsd.compiler.mk>
+
 .PATH: ${ZFSTOP}/cmd/zstream
 .PATH: ${ZFSTOP}/man/man8
 
@@ -43,6 +46,9 @@ CFLAGS+= \
 	-include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \
 	-DHAVE_ISSETUGID \
 	-include ${SRCTOP}/sys/modules/zfs/zfs_config.h
+.if ${COMPILER_TYPE} == "clang"
+CFLAGS.zstream_io.c+=	-Wno-error=atomic-alignment
+.endif
 
 LIBADD=	geom m nvpair umem avl spl zfs_core zfs zutil zpool pthread