tools/include: make uapi/linux/types.h usable from assembly
PATCH 1/1 tools/include: make uapi/linux/types.h usable from assembly
The "real" linux/types.h UAPI header gracefully degrades to a NOOP when included from assembly code.
Mirror this behaviour in the tools/ variant.
Test for __ASSEMBLER__ over __ASSEMBLY__ as the former is provided by the toolchain automatically.
---
Intended to be merged through the tip tree to fix the arm64 selftest build failure there.
--- tools/include/uapi/linux/types.h | 3 +++ 1 file changed, 3 insertions(+)
tools/include/uapi/linux/types.h +3 -0
@@ -4,6 +4,8 @@#include <asm-generic/int-ll64.h> +#ifndef __ASSEMBLER__ +/* copied from linux:include/uapi/linux/types.h */ #define __bitwisetypedef __u16 __bitwise __le16 ;
@@ -20,4 +22,5 @@ typedef __u32 __bitwise __wsum;#define __aligned_be64 __be64 __attribute__((aligned(8)))#define __aligned_le64 __le64 __attribute__((aligned(8))) +#endif /* __ASSEMBLER__ */ #endif /* _UAPI_LINUX_TYPES_H */
---
base-commit: 652262975db421767ada3f05b926854bbb357759
change-id: 20250321-uapi-consistency-38648d1235c1
Best regards,
Signature · 1 line
Thomas Weißschuh <[email protected]>
Quoted 7 lines · Thomas Weißschuh
The "real"
linux/types.hUAPI header gracefully degrades to a NOOP when included from assembly code.Mirror this behaviour in the
tools/variant.Test for
__ASSEMBLER__over__ASSEMBLY__as the former is provided by the toolchain automatically.