git: cb8adc837a64 - main - net/dot1ag-utils: fix build on powerpc64

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Mon, 19 Oct 2026 09:32:08 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cb8adc837a6430fd0b01f2cfd8a2f8a1bd169058

commit cb8adc837a6430fd0b01f2cfd8a2f8a1bd169058
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-10-18 15:56:03 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-10-19 09:26:37 +0000

    net/dot1ag-utils: fix build on powerpc64
    
    IS_TAGGED() compared one byte of the frame with htons(0x8100), which only
    works on little-endian by accident and makes clang's -Werror unhappy on
    big-endian. Read the TPID through struct cfmencap instead.
---
 net/dot1ag-utils/files/patch-src_ieee8021ag.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/net/dot1ag-utils/files/patch-src_ieee8021ag.h b/net/dot1ag-utils/files/patch-src_ieee8021ag.h
new file mode 100644
index 000000000000..d042da17ed37
--- /dev/null
+++ b/net/dot1ag-utils/files/patch-src_ieee8021ag.h
@@ -0,0 +1,11 @@
+--- src/ieee8021ag.h.orig	2026-08-16 07:27:42 UTC
++++ src/ieee8021ag.h
+@@ -209,7 +209,7 @@ struct cfm_lbm {
+ #define GET_MD_LEVEL(s)		(((s)->octet1.md_level >> 5) & 0x07)
+ 
+ /* positions of headers in Ethernet frame */
+-#define IS_TAGGED(s)		(*(s + ETHER_ADDR_LEN * 2) \
++#define IS_TAGGED(s)		(((const struct cfmencap *)(s))->tpid \
+ 					== htons(ETYPE_8021Q))
+ #define CFMHDR(s)		(struct cfmhdr *) \
+ 				(IS_TAGGED(s) ? \