From: Joe Perches Date: Mon, 24 Mar 2008 05:06:51 +0000 (-0700) Subject: [NET]: include/linux/udp.h - remove duplicate include X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=310afe86af8ddd96a06b75aa61ef1af233f80e89;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [NET]: include/linux/udp.h - remove duplicate include Remove duplicate #include Combine #ifdef __KERNEL__ blocks Signed-off-by: Joe Perches Signed-off-by: David S. Miller --- diff --git a/include/linux/udp.h b/include/linux/udp.h index 1e7b7cb5703b..581ca2c14c52 100644 --- a/include/linux/udp.h +++ b/include/linux/udp.h @@ -26,15 +26,6 @@ struct udphdr { __sum16 check; }; -#ifdef __KERNEL__ -#include - -static inline struct udphdr *udp_hdr(const struct sk_buff *skb) -{ - return (struct udphdr *)skb_transport_header(skb); -} -#endif - /* UDP socket options */ #define UDP_CORK 1 /* Never send partially complete segments */ #define UDP_ENCAP 100 /* Set the socket to accept encapsulated packets */ @@ -45,9 +36,14 @@ static inline struct udphdr *udp_hdr(const struct sk_buff *skb) #define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */ #ifdef __KERNEL__ -#include - #include +#include + +static inline struct udphdr *udp_hdr(const struct sk_buff *skb) +{ + return (struct udphdr *)skb_transport_header(skb); +} + #define UDP_HTABLE_SIZE 128 struct udp_sock {