aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2023-05-17 22:22:13 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2023-06-26 09:22:30 +0000
commit28dc06cfb4d9249bdf6fe7ace75284309e56d6f1 (patch)
tree7d90e686488d6b56416990d0f4872c1c89b0b768
parent9a37368d2beb26a236e9f91fbd5caefc055d0ef6 (diff)
downloadsrc-28dc06cfb4d9249bdf6fe7ace75284309e56d6f1.tar.gz
src-28dc06cfb4d9249bdf6fe7ace75284309e56d6f1.zip
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)
-rw-r--r--sys/compat/linuxkpi/common/include/linux/stddef.h15
1 files changed, 15 insertions, 0 deletions
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_ */
+