Merge from vendor branch TNF:
[pkgsrcv2.git] / net / slurm / patches / patch-ac
1 $NetBSD$
2
3 --- src/if_media.c.orig 2006-02-24 19:16:35.000000000 +0000
4 +++ src/if_media.c
5 @@ -10,9 +10,9 @@
6   *****************************************************************************/
7  
8 -#if defined (__FreeBSD__) || (__OpenBSD__) || (__NetBSD__) || (__MicroBSD__) || (__APPLE__)
9 +#if defined (__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__MicroBSD__) || defined(__APPLE__) || defined(__DragonFly__)
10  # define MEDIA_H_SUPPORTED
11  #endif
12  
13 -#if defined (__OpenBSD__) || (__NetBSD__) || (__MicroBSD__) || (__APPLE__)
14 +#if defined (__OpenBSD__) || defined(__NetBSD__) || defined(__MicroBSD__) || defined(__APPLE__)
15  # define NON_FreeBSD 1
16  # define WIRELESS 1
17 @@ -22,4 +22,6 @@
18  #  define WIRELESS 1
19  # endif
20 +# elif defined(__DragonFly__)
21 +#  define WIRELESS 1
22  # else
23  # define WIRELESS 0
24 @@ -119,10 +121,8 @@ int get_if_speed (char *ifstring)
25              switch (physical)
26              {
27 -#ifdef __FreeBSD__
28 -#if __FreeBSD__ <= 4
29 +#if (defined(__FreeBSD__) && __FreeBSD__ <= 4)
30                  case IFM_1000_FX:
31                  case IFM_1000_TX:
32  #endif
33 -#endif
34                  case IFM_1000_SX:
35                  case IFM_1000_LX:
36 @@ -147,8 +147,8 @@ int get_if_speed (char *ifstring)
37                      speed = 10 * 1000;
38                      break;
39 -#if defined(__OpenBSD__) || (__MicroBSD__) || (__NetBSD__) || (__APPLE__)
40 +#if defined(__OpenBSD__) || defined(__MicroBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__DragonFly__)
41          case IFM_HPNA_1:
42  #else
43 -#if __FreeBSD__ <= 4
44 +#if (defined(__FreeBSD__) && __FreeBSD__ <= 4)
45                 case IFM_homePNA:
46  #endif
47 @@ -196,5 +196,5 @@ int get_if_speed (char *ifstring)
48                      speed = 11 * 1000;
49                      break;
50 -#if WIRELESS && defined(__FreeBSD__) && (__FreeBSD_version >= 460102)
51 +#if WIRELESS && ((defined(__FreeBSD__) && (__FreeBSD_version >= 460102)) || defined(__DragonFly__))
52                  case IFM_IEEE80211_DS22:
53                      speed = 22 * 1000;
54 @@ -203,5 +203,6 @@ int get_if_speed (char *ifstring)
55  #if WIRELESS && \
56         (defined(__FreeBSD__) && (__FreeBSD_version >= 500111)) || \
57 -       (defined(__NetBSD__) && (__NetBSD_Version_ > 106020000))
58 +       (defined(__NetBSD__) && (__NetBSD_Version_ > 106020000)) || \
59 +       defined(__DragonFly__)
60                  case IFM_IEEE80211_OFDM6:
61                      speed = 6 * 1000;