generic: 5.15: refresh kernel patches
[openwrt/openwrt.git] / toolchain / glibc / patches / 100-fix_cross_rpcgen.patch
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
6 #ifndef __u_char_defined
7 -typedef __u_char u_char;
8 -typedef __u_short u_short;
9 -typedef __u_int u_int;
10 -typedef __u_long u_long;
11 -typedef __quad_t quad_t;
12 -typedef __u_quad_t u_quad_t;
13 -typedef __fsid_t fsid_t;
14 +typedef unsigned char u_char;
15 +typedef unsigned short u_short;
16 +typedef unsigned int u_int;
17 +typedef unsigned long u_long;
18 +#if __WORDSIZE == 64
19 +typedef long int quad_t;
20 +typedef unsigned long int u_quad_t;
21 +#elif defined __GLIBC_HAVE_LONG_LONG
22 +typedef long long int quad_t;
23 +typedef unsigned long long int u_quad_t;
24 +#endif
25 +typedef u_quad_t fsid_t;
26 # define __u_char_defined
27 #endif
28 -#ifndef __daddr_t_defined
29 -typedef __daddr_t daddr_t;
30 -typedef __caddr_t caddr_t;
31 +#if !defined(__daddr_t_defined) && defined(linux)
32 +typedef long int daddr_t;
33 +typedef char *caddr_t;
34 # define __daddr_t_defined
35 #endif
36