From 072cee2808b4615250dbc064f9fc0604f83f1b19 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 22 Jul 2009 18:51:55 +0200 Subject: little fixes for FreeBSD --- src/get_eth_info.c | 2 +- src/get_ip_addr.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/get_eth_info.c b/src/get_eth_info.c index 9172abb..6278b8c 100644 --- a/src/get_eth_info.c +++ b/src/get_eth_info.c @@ -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 diff --git a/src/get_ip_addr.c b/src/get_ip_addr.c index cc812f2..c394227 100644 --- a/src/get_ip_addr.c +++ b/src/get_ip_addr.c @@ -1,5 +1,5 @@ // vim:ts=8:expandtab -#include +#include #include #include #include @@ -7,6 +7,7 @@ #include #include #include +#include #include "i3status.h" -- cgit v1.2.3