From: Michael Jeanson Date: Tue, 16 Jul 2024 21:02:36 +0000 (-0400) Subject: fix: copy_struct_from_user() for non-LTS branches < v4.19 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=8223cd0cc94c68502c997aa6958b4a768dadb5d8;p=lttng-modules.git fix: copy_struct_from_user() for non-LTS branches < v4.19 The 'linux/bits.h' was backported to LTS branches but is not available on non-LTS before v4.19. Use 'asm/byteorder.h' instead to get the __LITTLE_ENDIAN define which is available on all kernel versions we support. Change-Id: Icfe733ab944616b3bd6d0023ad0869eefb830b34 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/include/wrapper/bitops.h b/include/wrapper/bitops.h index 01f63262..2693cd1d 100644 --- a/include/wrapper/bitops.h +++ b/include/wrapper/bitops.h @@ -5,11 +5,12 @@ #define _LTTNG_WRAPPER_BITOPS_H #include -#include #include #if LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(5,4,0) +#include + /* Set bits in the first 'n' bytes when loaded from memory */ # ifdef __LITTLE_ENDIAN # define lttng_aligned_byte_mask(n) ((1UL << 8*(n))-1)