git: 152e61976155 - main - bnxt: add guards around struct_group macros
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 05 May 2025 10:45:31 UTC
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];