As Dave wrote, it's (partly) a 32-bit big-endian issue.
This check in test/testevdev.c
#if ULONG_MAX == 0xFFFFFFFFUL
# define SwapLongLE(X) SDL_SwapLE32(X)
#else
/* assume 64-bit */
# define SwapLongLE(X) SDL_SwapLE64(X)
#endif
always chooses the #else part, because the <limits.h> file
isn't #included and thus ULONG_MAX isn't defined.
Adding:
#include <limits.h>
to the top of test/testevdev.c,
or applying the attached patch fixes the build on hppa (and probably power).
diff -up ./test/testevdev.c.org ./test/testevdev.c
--- ./test/testevdev.c.org 2022-10-09 09:23:28.958270080 +0000
+++ ./test/testevdev.c 2022-10-09 09:45:10.542076834 +0000
@@ -935,12 +935,8 @@ static const GuessTest guess_tests[] =
}
};
-#if ULONG_MAX == 0xFFFFFFFFUL
-# define SwapLongLE(X) SDL_SwapLE32(X)
-#else
- /* assume 64-bit */
-# define SwapLongLE(X) SDL_SwapLE64(X)
-#endif
+#define SwapLongLE(X) \
+ ((sizeof(unsigned long) == 4) ? SDL_SwapLE32(X) : SDL_SwapLE64(X))
static int
run_test(void)