From c0a2834d6b3cc5a0a3ca288d40caf1c024b68f55 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Sun, 23 Mar 2008 22:06:51 -0700 Subject: [PATCH] --- yaml --- r: 90251 b: refs/heads/master c: 310afe86af8ddd96a06b75aa61ef1af233f80e89 h: refs/heads/master i: 90249: c8b21a6cbd565cfd05db38051f62764de37ec94f 90247: d4febba723fa327cf9936f9dd14cfd257e239aa7 v: v3 --- [refs] | 2 +- trunk/include/linux/udp.h | 18 +++++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index e60f924b05b2..d570333f6277 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cc32e05416b4023a5466a2f66e3c02236a771c5b +refs/heads/master: 310afe86af8ddd96a06b75aa61ef1af233f80e89 diff --git a/trunk/include/linux/udp.h b/trunk/include/linux/udp.h index 1e7b7cb5703b..581ca2c14c52 100644 --- a/trunk/include/linux/udp.h +++ b/trunk/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 {