Skip to contentSkip to conversation

sanitize linux/isdn_divertif.h for userspace

PATCH New Mike Frysinger 1 participant 1 message May 2, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sanitize linux/isdn_divertif.h for userspace

the isdn_divertif contains kernel-only references so ive wrapped them in __KERNEL__ and add proper #include statements

---

include/linux/Kbuild +1 -1
index 4ff0f57..ab2aaa2 100644
@@ -91,7 +91,6 @@ header-y += ip_mp_alg.h
 header-y += ipsec.h
 header-y += ipx.h
 header-y += irda.h
-header-y += isdn_divertif.h
 header-y += iso_fs.h
 header-y += ixjuser.h
 header-y += jffs2.h
@@ -238,6 +237,7 @@ unifdef-y += ipv6.h
 unifdef-y += ipv6_route.h
 unifdef-y += isdn.h
 unifdef-y += isdnif.h
+unifdef-y += isdn_divertif.h
 unifdef-y += isdn_ppp.h
 unifdef-y += isicom.h
 unifdef-y += jbd.h
include/linux/isdn_divertif.h +5 -0
index 0e7e44c..0df24b2 100644
@@ -24,6 +24,10 @@
 #define DIVERT_REL_ERR  0x04  /* module not registered */
 #define DIVERT_REG_NAME isdn_register_divert
 
+#ifdef __KERNEL__
+#include <linux/isdnif.h>
+#include <linux/types.h>
+
 /***************************************************************/
 /* structure exchanging data between isdn hl and divert module */
 /***************************************************************/ 
@@ -40,3 +43,4 @@ typedef struct
 /* function register */
 /*********************/
 extern int DIVERT_REG_NAME(isdn_divert_if *);
+#endif