100-fix_cross_rpcgen.patch 937 B

123456789101112131415161718192021222324252627282930313233343536
  1. --- a/sunrpc/rpc/types.h
  2. +++ b/sunrpc/rpc/types.h
  3. @@ -75,18 +75,23 @@ typedef unsigned long rpcport_t;
  4. #endif
  5. #ifndef __u_char_defined
  6. -typedef __u_char u_char;
  7. -typedef __u_short u_short;
  8. -typedef __u_int u_int;
  9. -typedef __u_long u_long;
  10. -typedef __quad_t quad_t;
  11. -typedef __u_quad_t u_quad_t;
  12. -typedef __fsid_t fsid_t;
  13. +typedef unsigned char u_char;
  14. +typedef unsigned short u_short;
  15. +typedef unsigned int u_int;
  16. +typedef unsigned long u_long;
  17. +#if __WORDSIZE == 64
  18. +typedef long int quad_t;
  19. +typedef unsigned long int u_quad_t;
  20. +#elif defined __GLIBC_HAVE_LONG_LONG
  21. +typedef long long int quad_t;
  22. +typedef unsigned long long int u_quad_t;
  23. +#endif
  24. +typedef u_quad_t fsid_t;
  25. # define __u_char_defined
  26. #endif
  27. -#ifndef __daddr_t_defined
  28. -typedef __daddr_t daddr_t;
  29. -typedef __caddr_t caddr_t;
  30. +#if !defined(__daddr_t_defined) && defined(linux)
  31. +typedef long int daddr_t;
  32. +typedef char *caddr_t;
  33. # define __daddr_t_defined
  34. #endif