aboutsummaryrefslogtreecommitdiffstats
path: root/include/compat_af_isdn.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/compat_af_isdn.h')
-rw-r--r--include/compat_af_isdn.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/include/compat_af_isdn.h b/include/compat_af_isdn.h
new file mode 100644
index 00000000..56cbfb3f
--- /dev/null
+++ b/include/compat_af_isdn.h
@@ -0,0 +1,39 @@
+#ifdef MISDN_OLD_AF_COMPATIBILITY
+#undef AF_ISDN
+#undef PF_ISDN
+
+extern int AF_ISDN;
+#define PF_ISDN AF_ISDN
+
+int AF_ISDN;
+
+#endif
+
+extern void init_af_isdn(void);
+
+#ifdef AF_COMPATIBILITY_FUNC
+#ifdef MISDN_OLD_AF_COMPATIBILITY
+void init_af_isdn(void)
+{
+ int s;
+
+ /* test for new value */
+ AF_ISDN = 34;
+ s = socket(AF_ISDN, SOCK_RAW, ISDN_P_BASE);
+ if (s >= 0) {
+ close(s);
+ return;
+ }
+ AF_ISDN = 27;
+ s = socket(AF_ISDN, SOCK_RAW, ISDN_P_BASE);
+ if (s >= 0) {
+ close(s);
+ return;
+ }
+}
+#else
+void init_af_isdn(void)
+{
+}
+#endif
+#endif