summaryrefslogtreecommitdiff
path: root/net/zaptel12/files/patch-zaptel::zaptel.c
blob: a5fc0b4cf7d9c1aa107184324de182d37acd084f (plain) (blame)
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
$FreeBSD$

--- zaptel/zaptel.c
+++ zaptel/zaptel.c
@@ -156,12 +156,17 @@
 #endif
 
 static struct cdevsw zt_devsw = {
-#if __FreeBSD_version >= 502103
+#if __FreeBSD_version < 502103
+#ifdef MAJOR_AUTO
+		.d_maj = MAJOR_AUTO,
+#else
+		.d_maj = ZT_MAJOR,
+#endif
+#else
 		.d_version = D_VERSION,
 #endif
 		.d_open			= ztopen,
-		.d_name			= "zaptel",
-		.d_maj			= ZT_MAJOR
+		.d_name			= "zaptel"
 };