summaryrefslogtreecommitdiff
path: root/tools/include
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2026-06-03 18:00:06 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2026-06-03 18:00:06 +0300
commit9fb628b4cd3488a36e3fc9b22bb840048aa1a9d2 (patch)
tree393daf8614f7915c98eca753d79545aa7e9feb99 /tools/include
parentffb83b98357658b44a8a3b617a42d7ae48514ffd (diff)
parentc114187c5dcf1a66a2910ec66a87d230d523e5c1 (diff)
downloadlinux-9fb628b4cd3488a36e3fc9b22bb840048aa1a9d2.tar.xz
Merge branch 'kvm-ghcb-for-7.2' into HEAD
Merge the final part of the GHCB 7.2 fixes at https://lore.kernel.org/kvm/20260529183549.1104619-1-pbonzini@redhat.com/. Patches 1-17 have already been included in Linux 7.1; these are minor cleanups, and fixes for behaviors that are suboptimal or contradicting the specification. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/include')
-rw-r--r--tools/include/uapi/linux/stddef.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/tools/include/uapi/linux/stddef.h b/tools/include/uapi/linux/stddef.h
index c53cde425406..457498259494 100644
--- a/tools/include/uapi/linux/stddef.h
+++ b/tools/include/uapi/linux/stddef.h
@@ -3,7 +3,6 @@
#define _LINUX_STDDEF_H
-
#ifndef __always_inline
#define __always_inline __inline__
#endif
@@ -36,6 +35,11 @@
struct __struct_group_tag(TAG) { MEMBERS } ATTRS NAME; \
} ATTRS
+#ifdef __cplusplus
+/* sizeof(struct{}) is 1 in C++, not 0, can't use C version of the macro. */
+#define __DECLARE_FLEX_ARRAY(T, member) \
+ T member[0]
+#else
/**
* __DECLARE_FLEX_ARRAY() - Declare a flexible array usable in a union
*
@@ -52,3 +56,23 @@
TYPE NAME[]; \
}
#endif
+
+#ifndef __counted_by
+#define __counted_by(m)
+#endif
+
+#ifndef __counted_by_le
+#define __counted_by_le(m)
+#endif
+
+#ifndef __counted_by_be
+#define __counted_by_be(m)
+#endif
+
+#ifndef __counted_by_ptr
+#define __counted_by_ptr(m)
+#endif
+
+#define __kernel_nonstring
+
+#endif /* _LINUX_STDDEF_H */