diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/if_tun.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h index 3f5fd523b49d..404abe00162c 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h | |||
@@ -86,4 +86,18 @@ struct tun_filter { | |||
86 | __u8 addr[0][ETH_ALEN]; | 86 | __u8 addr[0][ETH_ALEN]; |
87 | }; | 87 | }; |
88 | 88 | ||
89 | #ifdef __KERNEL__ | ||
90 | #if defined(CONFIG_TUN) || defined(CONFIG_TUN_MODULE) | ||
91 | struct socket *tun_get_socket(struct file *); | ||
92 | #else | ||
93 | #include <linux/err.h> | ||
94 | #include <linux/errno.h> | ||
95 | struct file; | ||
96 | struct socket; | ||
97 | static inline struct socket *tun_get_socket(struct file *f) | ||
98 | { | ||
99 | return ERR_PTR(-EINVAL); | ||
100 | } | ||
101 | #endif /* CONFIG_TUN */ | ||
102 | #endif /* __KERNEL__ */ | ||
89 | #endif /* __IF_TUN_H */ | 103 | #endif /* __IF_TUN_H */ |