Remove the __KERNEL__ ifdefs from the non-UAPI sunrpc headers, as those can't be included from user space programs.
Showing the changes to include/linux (12 of 12 files). Show all
Unified · Split
| @@ -10,8 +10,6 @@ · 9 unmodified lines | ||
| 10 | 10 | #ifndef _LINUX_SUNRPC_AUTH_H |
| 11 | 11 | #define _LINUX_SUNRPC_AUTH_H |
| 12 | 12 | |
| 13 | −#ifdef __KERNEL__ | |
| 14 | − | |
| 15 | 13 | #include <linux/sunrpc/sched.h> |
| 16 | 14 | #include <linux/sunrpc/msg_prot.h> |
| 17 | 15 | #include <linux/sunrpc/xdr.h> |
| @@ -194,5 +192,4 @@ struct rpc_cred *get_rpccred(struct rpc_cred *cred) · 176 unmodified lines | ||
| 194 | 192 | return NULL; |
| 195 | 193 | } |
| 196 | 194 | |
| 197 | −#endif /* __KERNEL__ */ | |
| 198 | 195 | #endif /* _LINUX_SUNRPC_AUTH_H */ |
| @@ -13,7 +13,6 @@ · 12 unmodified lines | ||
| 13 | 13 | #ifndef _LINUX_SUNRPC_AUTH_GSS_H |
| 14 | 14 | #define _LINUX_SUNRPC_AUTH_GSS_H |
| 15 | 15 | |
| 16 | −#ifdef __KERNEL__ | |
| 17 | 16 | #include <linux/refcount.h> |
| 18 | 17 | #include <linux/sunrpc/auth.h> |
| 19 | 18 | #include <linux/sunrpc/svc.h> |
| @@ -90,6 +89,5 @@ struct gss_cred { · 70 unmodified lines | ||
| 90 | 89 | unsigned long gc_upcall_timestamp; |
| 91 | 90 | }; |
| 92 | 91 | |
| 93 | −#endif /* __KERNEL__ */ | |
| 94 | 92 | #endif /* _LINUX_SUNRPC_AUTH_GSS_H */ |
| 95 | 93 | |
| @@ -109,8 +109,6 @@ struct rpc_procinfo { · 108 unmodified lines | ||
| 109 | 109 | const char * p_name; /* name of procedure */ |
| 110 | 110 | }; |
| 111 | 111 | |
| 112 | −#ifdef __KERNEL__ | |
| 113 | − | |
| 114 | 112 | struct rpc_create_args { |
| 115 | 113 | struct net *net; |
| 116 | 114 | int protocol; |
| @@ -237,5 +235,4 @@ static inline int rpc_reply_expected(struct rpc_task *task) · 120 unmodified lines | ||
| 237 | 235 | (task->tk_msg.rpc_proc->p_decode != NULL); |
| 238 | 236 | } |
| 239 | 237 | |
| 240 | −#endif /* __KERNEL__ */ | |
| 241 | 238 | #endif /* _LINUX_SUNRPC_CLNT_H */ |
| @@ -13,7 +13,6 @@ · 12 unmodified lines | ||
| 13 | 13 | #ifndef _LINUX_SUNRPC_GSS_API_H |
| 14 | 14 | #define _LINUX_SUNRPC_GSS_API_H |
| 15 | 15 | |
| 16 | −#ifdef __KERNEL__ | |
| 17 | 16 | #include <linux/sunrpc/xdr.h> |
| 18 | 17 | #include <linux/sunrpc/msg_prot.h> |
| 19 | 18 | #include <linux/uio.h> |
| @@ -160,6 +159,5 @@ struct gss_api_mech * gss_mech_get(struct gss_api_mech *); · 140 unmodified lines | ||
| 160 | 159 | * corresponding call to gss_mech_put. */ |
| 161 | 160 | void gss_mech_put(struct gss_api_mech *); |
| 162 | 161 | |
| 163 | −#endif /* __KERNEL__ */ | |
| 164 | 162 | #endif /* _LINUX_SUNRPC_GSS_API_H */ |
| 165 | 163 | |
| @@ -34,8 +34,6 @@ · 33 unmodified lines | ||
| 34 | 34 | #ifndef _LINUX_SUNRPC_GSS_ERR_H |
| 35 | 35 | #define _LINUX_SUNRPC_GSS_ERR_H |
| 36 | 36 | |
| 37 | −#ifdef __KERNEL__ | |
| 38 | − | |
| 39 | 37 | typedef unsigned int OM_uint32; |
| 40 | 38 | |
| 41 | 39 | /* |
| @@ -163,5 +161,4 @@ typedef unsigned int OM_uint32; · 121 unmodified lines | ||
| 163 | 161 | /* XXXX This is a necessary evil until the spec is fixed */ |
| 164 | 162 | #define GSS_S_CRED_UNAVAIL GSS_S_FAILURE |
| 165 | 163 | |
| 166 | −#endif /* __KERNEL__ */ | |
| 167 | 164 | #endif /* __LINUX_SUNRPC_GSS_ERR_H */ |
| @@ -8,8 +8,6 @@ · 7 unmodified lines | ||
| 8 | 8 | #ifndef _LINUX_SUNRPC_MSGPROT_H_ |
| 9 | 9 | #define _LINUX_SUNRPC_MSGPROT_H_ |
| 10 | 10 | |
| 11 | −#ifdef __KERNEL__ /* user programs should get these from the rpc header files */ | |
| 12 | − | |
| 13 | 11 | #define RPC_VERSION 2 |
| 14 | 12 | |
| 15 | 13 | /* size of an XDR encoding unit in bytes, i.e. 32bit */ |
| @@ -217,5 +215,4 @@ typedef __be32 rpc_fraghdr; · 201 unmodified lines | ||
| 217 | 215 | /* Assume INET6_ADDRSTRLEN will always be larger than INET_ADDRSTRLEN... */ |
| 218 | 216 | #define RPCBIND_MAXUADDRLEN RPCBIND_MAXUADDR6LEN |
| 219 | 217 | |
| 220 | −#endif /* __KERNEL__ */ | |
| 221 | 218 | #endif /* _LINUX_SUNRPC_MSGPROT_H_ */ |
| @@ -2,8 +2,6 @@ · 1 unmodified line | ||
| 2 | 2 | #ifndef _LINUX_SUNRPC_RPC_PIPE_FS_H |
| 3 | 3 | #define _LINUX_SUNRPC_RPC_PIPE_FS_H |
| 4 | 4 | |
| 5 | −#ifdef __KERNEL__ | |
| 6 | − | |
| 7 | 5 | #include <linux/workqueue.h> |
| 8 | 6 | |
| 9 | 7 | struct rpc_pipe_dir_head { |
| @@ -133,4 +131,3 @@ extern void unregister_rpc_pipefs(void); · 123 unmodified lines | ||
| 133 | 131 | extern bool gssd_running(struct net *net); |
| 134 | 132 | |
| 135 | 133 | #endif |
| 136 | −#endif | |
| @@ -10,8 +10,6 @@ · 9 unmodified lines | ||
| 10 | 10 | #ifndef _LINUX_SUNRPC_SVCAUTH_H_ |
| 11 | 11 | #define _LINUX_SUNRPC_SVCAUTH_H_ |
| 12 | 12 | |
| 13 | −#ifdef __KERNEL__ | |
| 14 | − | |
| 15 | 13 | #include <linux/string.h> |
| 16 | 14 | #include <linux/sunrpc/msg_prot.h> |
| 17 | 15 | #include <linux/sunrpc/cache.h> |
| @@ -185,6 +183,4 @@ static inline unsigned long hash_mem(char const *buf, int length, int bits) · 167 unmodified lines | ||
| 185 | 183 | return full_name_hash(NULL, buf, length) >> (32 - bits); |
| 186 | 184 | } |
| 187 | 185 | |
| 188 | −#endif /* __KERNEL__ */ | |
| 189 | − | |
| 190 | 186 | #endif /* _LINUX_SUNRPC_SVCAUTH_H_ */ |
| @@ -9,7 +9,6 @@ · 8 unmodified lines | ||
| 9 | 9 | #ifndef _LINUX_SUNRPC_SVCAUTH_GSS_H |
| 10 | 10 | #define _LINUX_SUNRPC_SVCAUTH_GSS_H |
| 11 | 11 | |
| 12 | −#ifdef __KERNEL__ | |
| 13 | 12 | #include <linux/sched.h> |
| 14 | 13 | #include <linux/sunrpc/types.h> |
| 15 | 14 | #include <linux/sunrpc/xdr.h> |
| @@ -24,5 +23,4 @@ void gss_svc_shutdown_net(struct net *net); · 8 unmodified lines | ||
| 24 | 23 | int svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name); |
| 25 | 24 | u32 svcauth_gss_flavor(struct auth_domain *dom); |
| 26 | 25 | |
| 27 | −#endif /* __KERNEL__ */ | |
| 28 | 26 | #endif /* _LINUX_SUNRPC_SVCAUTH_GSS_H */ |
| @@ -11,8 +11,6 @@ · 10 unmodified lines | ||
| 11 | 11 | #ifndef _SUNRPC_XDR_H_ |
| 12 | 12 | #define _SUNRPC_XDR_H_ |
| 13 | 13 | |
| 14 | −#ifdef __KERNEL__ | |
| 15 | − | |
| 16 | 14 | #include <linux/uio.h> |
| 17 | 15 | #include <asm/byteorder.h> |
| 18 | 16 | #include <asm/unaligned.h> |
| @@ -552,6 +550,5 @@ xdr_stream_decode_uint32_array(struct xdr_stream *xdr, · 533 unmodified lines | ||
| 552 | 550 | *array = be32_to_cpup(p); |
| 553 | 551 | return retval; |
| 554 | 552 | } |
| 555 | −#endif /* __KERNEL__ */ | |
| 556 | 553 | |
| 557 | 554 | #endif /* _SUNRPC_XDR_H_ */ |
| @@ -19,8 +19,6 @@ · 18 unmodified lines | ||
| 19 | 19 | #include <linux/sunrpc/xdr.h> |
| 20 | 20 | #include <linux/sunrpc/msg_prot.h> |
| 21 | 21 | |
| 22 | −#ifdef __KERNEL__ | |
| 23 | − | |
| 24 | 22 | #define RPC_MIN_SLOT_TABLE (2U) |
| 25 | 23 | #define RPC_DEF_SLOT_TABLE (16U) |
| 26 | 24 | #define RPC_MAX_SLOT_TABLE_LIMIT (65536U) |
| @@ -505,6 +503,4 @@ static inline void xprt_inject_disconnect(struct rpc_xprt *xprt) · 478 unmodified lines | ||
| 505 | 503 | } |
| 506 | 504 | #endif |
| 507 | 505 | |
| 508 | −#endif /* __KERNEL__*/ | |
| 509 | − | |
| 510 | 506 | #endif /* _LINUX_SUNRPC_XPRT_H */ |
| @@ -8,8 +8,6 @@ · 7 unmodified lines | ||
| 8 | 8 | #ifndef _LINUX_SUNRPC_XPRTSOCK_H |
| 9 | 9 | #define _LINUX_SUNRPC_XPRTSOCK_H |
| 10 | 10 | |
| 11 | −#ifdef __KERNEL__ | |
| 12 | − | |
| 13 | 11 | int init_socket_xprt(void); |
| 14 | 12 | void cleanup_socket_xprt(void); |
| 15 | 13 | |
| @@ -90,6 +88,4 @@ struct sock_xprt { · 74 unmodified lines | ||
| 90 | 88 | #define XPRT_SOCK_WAKE_PENDING (6) |
| 91 | 89 | #define XPRT_SOCK_WAKE_DISCONNECT (7) |
| 92 | 90 | |
| 93 | −#endif /* __KERNEL__ */ | |
| 94 | − | |
| 95 | 91 | #endif /* _LINUX_SUNRPC_XPRTSOCK_H */ |