Allow to print eth information on NetBSD

This commit is contained in:
Arnaud Degroote 2013-10-06 18:13:05 +00:00 committed by Michael Stapelberg
parent 57730f726f
commit cf2fb61911

View File

@ -27,7 +27,7 @@
#define PART_ETHSPEED "E: %s (%s)"
#endif
#if defined(__OpenBSD__)
#if defined(__OpenBSD__) || defined(__NetBSD__)
#include <errno.h>
#include <net/if_media.h>
#endif
@ -69,7 +69,7 @@ static int print_eth_speed(char *outwalk, const char *interface) {
}
ethspeed = (desc->ifmt_string != NULL ? desc->ifmt_string : "?");
return sprintf(outwalk, "%s", ethspeed);
#elif defined(__OpenBSD__)
#elif defined(__OpenBSD__) || defined(__NetBSD__)
char *ethspeed;
struct ifmediareq ifmr;