openbsd-ports/net/slurm/patches/patch-src_if_media_c
2009-11-10 23:07:46 +00:00

31 lines
931 B
Plaintext

$OpenBSD: patch-src_if_media_c,v 1.2 2009/11/10 23:07:46 sthen Exp $
--- src/if_media.c.orig Mon Sep 27 15:08:59 2004
+++ src/if_media.c Sat Nov 7 11:22:56 2009
@@ -95,8 +95,16 @@ int get_if_speed (char *ifstring)
*
*/
+#ifdef IFM_TYPE
+ type = IFM_TYPE(ifmr.ifm_active);
+#else
type = ifmr.ifm_active & 0xf0;
+#endif
+#ifdef IFM_TYPE
+ physical = IFM_SUBTYPE(ifmr.ifm_active);
+#else
physical = ifmr.ifm_active & 0x0f;
+#endif
#ifdef MEDIADEBUG
printf(" all: %6d\n", ifmr.ifm_current);
@@ -202,7 +210,8 @@ int get_if_speed (char *ifstring)
#endif
#if WIRELESS && \
(defined(__FreeBSD__) && (__FreeBSD_version >= 500111)) || \
- (defined(__NetBSD__) && (__NetBSD_Version_ > 106020000))
+ (defined(__NetBSD__) && (__NetBSD_Version_ > 106020000)) || \
+ defined(__OpenBSD__)
case IFM_IEEE80211_OFDM6:
speed = 6 * 1000;
break;