You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
934 B

  1. From e370ad5256f4a0b37f70a5b2e4a56f2c37235026 Mon Sep 17 00:00:00 2001
  2. From: Rosen Penev <rosenp@gmail.com>
  3. Date: Sun, 2 Jan 2022 15:21:50 -0800
  4. Subject: [PATCH] testj1939: fix 64-bit types for some platforms
  5. Revert commit that introduced PRIx64 to print an __u64, and added
  6. define to get the same types on all platforms.
  7. With __SANE_USERSPACE_TYPES__ the Linux headers use an unsigned long
  8. long for __u64 on all platforms, especially MIPS64.
  9. Fixes: eb9cfac9543b ("use PRIx64")
  10. Signed-off-by: Rosen Penev <rosenp@gmail.com>
  11. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  12. ---
  13. libj1939.h | 3 +++
  14. 1 file changed, 3 insertions(+)
  15. --- a/libj1939.h
  16. +++ b/libj1939.h
  17. @@ -10,6 +10,9 @@
  18. * as published by the Free Software Foundation
  19. */
  20. +/* needed on some 644 bit platforms to get consistent 64-bit types */
  21. +#define __SANE_USERSPACE_TYPES__
  22. +
  23. #include <sys/socket.h>
  24. #include <linux/can.h>
  25. #include <linux/can/j1939.h>