aboutsummaryrefslogtreecommitdiffstats
path: root/include/compat_af_isdn.h
blob: 56cbfb3f275f0a1d831f06395ecfd985753f15c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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