summaryrefslogtreecommitdiff
path: root/src/print_eth_info.c
diff options
context:
space:
mode:
authorScott Tincman <sctincman@gmail.com>2012-11-13 20:29:55 -0500
committerMichael Stapelberg <michael@stapelberg.de>2012-11-15 12:31:17 +0100
commit0eeded8bc013857a5e8a2efbc20002a22502897e (patch)
tree340c1c11296923acbf2cc3b28c3299e8cb7730fb /src/print_eth_info.c
parent2f20400d7af06d1a283bf727ce7af27f68f255f5 (diff)
DragonFlyBSD support added
Diffstat (limited to 'src/print_eth_info.c')
-rw-r--r--src/print_eth_info.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/print_eth_info.c b/src/print_eth_info.c
index d09873e..8af0dec 100644
--- a/src/print_eth_info.c
+++ b/src/print_eth_info.c
@@ -19,7 +19,7 @@
#define PART_ETHSPEED "E: %s (%d Mbit/s)"
#endif
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
#include <net/if_media.h>
#define IFM_TYPE_MATCH(dt, t) \
(IFM_TYPE((dt)) == 0 || IFM_TYPE((dt)) == IFM_TYPE((t)))
@@ -47,7 +47,7 @@ static int print_eth_speed(char *outwalk, const char *interface) {
ethspeed = (ecmd.speed == USHRT_MAX ? 0 : ecmd.speed);
return sprintf(outwalk, "%d Mbit/s", ethspeed);
} else return sprintf(outwalk, "?");
-#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
char *ethspeed;
struct ifmediareq ifm;
(void)memset(&ifm, 0, sizeof(ifm));