Package: iftop
Version: 0.17-16
Severity: normal
Due to inapropriate preprocessor conditionals in the
source file "iftop-0.17/addrs_ioctl.c", the binary
compiled for the architectures kfreebsd-i386 and
kfreebsd-amd64 will not be able to detect the correct
link-level address ("hwaddr" in Linux vocabulary).
The following patch is an elementary counter action.
Regards,
Mats Erik Andersson, fil. dr
--- iftop-0.17/addrs_ioctl.c.orig
+++ iftop-0.17/addrs_ioctl.c
@@ -18,7 +18,8 @@
#include <net/if.h>
#include <netinet/in.h>
-#if defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
+#if defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__ \
+ || ( defined __GNUC__ && ! defined __linux__ )
#include <sys/param.h>
#include <sys/sysctl.h>
#include <net/if_dl.h>
@@ -71,7 +72,8 @@ get_addrs_ioctl(char *interface, char if
got_hw_addr = 1;
}
#else
-#if defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
+#if defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__ \
+ || ( defined __GNUC__ && ! defined __linux__ )
{
int sysctlparam[6] = {CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, 0};
size_t needed = 0;
signature.asc
Description: Digital signature

