Some C libraries may not define the ulong typedef that is commonly available as a BSD/GNU extension. Add a fallback typedef to ensure ulong is available across all selftest environments.
Signed-off-by: Aqib Faruqui <aqi...@amazon.com> --- tools/testing/selftests/kselftest.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h index f362c6766..a1088a2af 100644 --- a/tools/testing/selftests/kselftest.h +++ b/tools/testing/selftests/kselftest.h @@ -58,6 +58,11 @@ #include <stdio.h> #include <sys/utsname.h> #include <sys/syscall.h> +#include <sys/types.h> +#endif + +#ifndef ulong +typedef unsigned long ulong; #endif #ifndef ARRAY_SIZE -- 2.47.3