Date: Mon, 5 May 2025 10:45:31 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 152e61976155 - main - bnxt: add guards around struct_group macros Message-ID: <202505051045.545AjV7D050326@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=152e6197615570e7a2f5f1c6c2ed00ecee9dd10c commit 152e6197615570e7a2f5f1c6c2ed00ecee9dd10c Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2025-05-03 20:22:32 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2025-05-05 10:44:22 +0000 bnxt: add guards around struct_group macros The header file might be included after linux/stddef.h or others are included and the macros would be re-defined. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D50156 --- sys/dev/bnxt/bnxt_en/bnxt_dcb.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/bnxt/bnxt_en/bnxt_dcb.h b/sys/dev/bnxt/bnxt_en/bnxt_dcb.h index 293f1b85dad5..fa68401583ca 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_dcb.h +++ b/sys/dev/bnxt/bnxt_en/bnxt_dcb.h @@ -40,13 +40,17 @@ #define BNXT_DCB_CAP_DCBX_VER_IEEE 0x08 #define BNXT_DCB_CAP_DCBX_STATIC 0x10 +#ifndef __struct_group #define __struct_group(TAG, NAME, ATTRS, MEMBERS...) \ union { \ struct { MEMBERS } ATTRS; \ struct TAG { MEMBERS } ATTRS NAME; \ } +#endif +#ifndef struct_group_attr #define struct_group_attr(NAME, ATTRS, MEMBERS...) \ __struct_group(/* no tag */, NAME, ATTRS, MEMBERS) +#endif struct bnxt_cos2bw_cfg { uint8_t pad[3];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202505051045.545AjV7D050326>