Skip to content

Commit 0efdedb

Browse files
t-8chtorvalds
authored andcommitted
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. Reported-by: Mark Brown <[email protected]> Closes: https://lore.kernel.org/lkml/[email protected]/ Fixes: c9fbaa8 ("selftests: vDSO: parse_vdso: Use UAPI headers instead of libc headers") Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]> Reviewed-by: Mark Brown <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 7103292 commit 0efdedb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/include/uapi/linux/types.h

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
#include <asm-generic/int-ll64.h>
66

7+
#ifndef __ASSEMBLER__
8+
79
/* copied from linux:include/uapi/linux/types.h */
810
#define __bitwise
911
typedef __u16 __bitwise __le16;
@@ -20,4 +22,5 @@ typedef __u32 __bitwise __wsum;
2022
#define __aligned_be64 __be64 __attribute__((aligned(8)))
2123
#define __aligned_le64 __le64 __attribute__((aligned(8)))
2224

25+
#endif /* __ASSEMBLER__ */
2326
#endif /* _UAPI_LINUX_TYPES_H */

0 commit comments

Comments
 (0)