8fe5b9357d
symbols. Feature tests should be done with defined() after all.
61 lines
2.3 KiB
Text
61 lines
2.3 KiB
Text
$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;
|