Harald Welte | 59b0468 | 2009-06-10 05:40:52 +0800 | [diff] [blame] | 1 | #ifdef MISDN_OLD_AF_COMPATIBILITY |
| 2 | #undef AF_ISDN |
| 3 | #undef PF_ISDN |
| 4 | |
| 5 | extern int AF_ISDN; |
| 6 | #define PF_ISDN AF_ISDN |
| 7 | |
| 8 | int AF_ISDN; |
| 9 | |
| 10 | #endif |
| 11 | |
| 12 | extern void init_af_isdn(void); |
| 13 | |
| 14 | #ifdef AF_COMPATIBILITY_FUNC |
| 15 | #ifdef MISDN_OLD_AF_COMPATIBILITY |
| 16 | void 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 |
| 35 | void init_af_isdn(void) |
| 36 | { |
| 37 | } |
| 38 | #endif |
| 39 | #endif |