little fixes for FreeBSD
This commit is contained in:
parent
329a8994f7
commit
072cee2808
@ -74,7 +74,7 @@ const char *get_eth_info() {
|
||||
#elif defined(__FreeBSD__)
|
||||
struct ifmediareq ifm;
|
||||
(void)memset(&ifm, 0, sizeof(ifm));
|
||||
(void)strncpy(ifm.ifm_name, ifaddr->ifa_name, sizeof(ifm.ifm_name));
|
||||
(void)strncpy(ifm.ifm_name, eth_interface, sizeof(ifm.ifm_name));
|
||||
int ret = ioctl(general_socket, SIOCGIFMEDIA, (caddr_t)&ifm);
|
||||
|
||||
/* Get the description of the media type, partially taken from
|
||||
|
@ -1,5 +1,5 @@
|
||||
// vim:ts=8:expandtab
|
||||
#include <net/if.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
@ -7,6 +7,7 @@
|
||||
#include <string.h>
|
||||
#include <netdb.h>
|
||||
#include <ifaddrs.h>
|
||||
#include <net/if.h>
|
||||
|
||||
#include "i3status.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user