blob: 56cbfb3f275f0a1d831f06395ecfd985753f15c2 [file] [log] [blame]
Harald Welte5b6cfaf2008-12-27 00:51:07 +00001#ifdef MISDN_OLD_AF_COMPATIBILITY
2#undef AF_ISDN
3#undef PF_ISDN
4
5extern int AF_ISDN;
6#define PF_ISDN AF_ISDN
7
8int AF_ISDN;
9
10#endif
11
12extern void init_af_isdn(void);
13
14#ifdef AF_COMPATIBILITY_FUNC
15#ifdef MISDN_OLD_AF_COMPATIBILITY
16void init_af_isdn(void)
17{
18 int s;
19
20 /* test for new value */
21 AF_ISDN = 34;
22 s = socket(AF_ISDN, SOCK_RAW, ISDN_P_BASE);
23 if (s >= 0) {
24 close(s);
25 return;
26 }
27 AF_ISDN = 27;
28 s = socket(AF_ISDN, SOCK_RAW, ISDN_P_BASE);
29 if (s >= 0) {
30 close(s);
31 return;
32 }
33}
34#else
35void init_af_isdn(void)
36{
37}
38#endif
39#endif