git: 28dc06cfb4d9 - stable/13 - LinuxKPI: Add linux/stddef.h and add struct_group(...)

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Mon, 26 Jun 2023 12:09:00 UTC
The branch stable/13 has been updated by bz:

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

commit 28dc06cfb4d9249bdf6fe7ace75284309e56d6f1
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-05-17 22:22:13 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2023-06-26 09:22:30 +0000

    LinuxKPI: Add linux/stddef.h and add struct_group(...)
    
    Merge the original addition of stddef.h.
    
    (cherry picked from commit 7c7419f60cafa4f666f5a22b5e5f090081516cd2)
    
    Add a struct_group() macro needed by a wireless driver.
    
    Sponsored by:   The FreeBSD Foundation
    Reviewed by:    hselasky
    Differential Revision: https://reviews.freebsd.org/D40138
    
    (cherry picked from commit 7c0c69d1a0f3735e315a48436bffbd482f956270)
---
 sys/compat/linuxkpi/common/include/linux/stddef.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/stddef.h b/sys/compat/linuxkpi/common/include/linux/stddef.h
new file mode 100644
index 000000000000..a3bc6b13765e
--- /dev/null
+++ b/sys/compat/linuxkpi/common/include/linux/stddef.h
@@ -0,0 +1,15 @@
+/* Public domain */
+
+#ifndef _LINUXKPI_LINUX_STDDEF_H_
+#define	_LINUXKPI_LINUX_STDDEF_H_
+
+#include <sys/stddef.h>
+
+#define	struct_group(NAME, ...)						\
+    union {								\
+	struct { __VA_ARGS__ };						\
+	struct { __VA_ARGS__ } NAME;					\
+    }
+
+#endif	/* _LINUXKPI_LINUX_STDDEF_H_ */
+