summaryrefslogtreecommitdiff
path: root/net/slurm/patches/patch-ac
blob: 09924be24fcb9035a424e75ead24e0c2ddc91c7b (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
$NetBSD: patch-ac,v 1.3 2006/02/24 19:25:33 joerg Exp $

--- src/if_media.c.orig	2006-02-24 19:16:35.000000000 +0000
+++ src/if_media.c
@@ -10,9 +10,9 @@
  *****************************************************************************/
 
-#if defined (__FreeBSD__) || (__OpenBSD__) || (__NetBSD__) || (__MicroBSD__) || (__APPLE__)
+#if defined (__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__MicroBSD__) || defined(__APPLE__) || defined(__DragonFly__)
 # define MEDIA_H_SUPPORTED
 #endif
 
-#if defined (__OpenBSD__) || (__NetBSD__) || (__MicroBSD__) || (__APPLE__)
+#if defined (__OpenBSD__) || defined(__NetBSD__) || defined(__MicroBSD__) || defined(__APPLE__)
 # define NON_FreeBSD 1
 # define WIRELESS 1
@@ -22,4 +22,6 @@
 #  define WIRELESS 1
 # endif
+# elif defined(__DragonFly__)
+#  define WIRELESS 1
 # else
 # define WIRELESS 0
@@ -119,10 +121,8 @@ int get_if_speed (char *ifstring)
             switch (physical)
             {
-#ifdef __FreeBSD__
-#if __FreeBSD__ <= 4
+#if (defined(__FreeBSD__) && __FreeBSD__ <= 4)
                 case IFM_1000_FX:
                 case IFM_1000_TX:
 #endif
-#endif
                 case IFM_1000_SX:
                 case IFM_1000_LX:
@@ -147,8 +147,8 @@ int get_if_speed (char *ifstring)
                     speed = 10 * 1000;
                     break;
-#if defined(__OpenBSD__) || (__MicroBSD__) || (__NetBSD__) || (__APPLE__)
+#if defined(__OpenBSD__) || defined(__MicroBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__DragonFly__)
         case IFM_HPNA_1:
 #else
-#if __FreeBSD__ <= 4
+#if (defined(__FreeBSD__) && __FreeBSD__ <= 4)
 		case IFM_homePNA:
 #endif
@@ -196,5 +196,5 @@ int get_if_speed (char *ifstring)
                     speed = 11 * 1000;
                     break;
-#if WIRELESS && defined(__FreeBSD__) && (__FreeBSD_version >= 460102)
+#if WIRELESS && ((defined(__FreeBSD__) && (__FreeBSD_version >= 460102)) || defined(__DragonFly__))
                 case IFM_IEEE80211_DS22:
                     speed = 22 * 1000;
@@ -203,5 +203,6 @@ int get_if_speed (char *ifstring)
 #if WIRELESS && \
 	(defined(__FreeBSD__) && (__FreeBSD_version >= 500111)) || \
-	(defined(__NetBSD__) && (__NetBSD_Version_ > 106020000))
+	(defined(__NetBSD__) && (__NetBSD_Version_ > 106020000)) || \
+	defined(__DragonFly__)
                 case IFM_IEEE80211_OFDM6:
                     speed = 6 * 1000;