Update to 0.12

This commit is contained in:
Alexander Nedotsukov 2005-04-21 03:06:52 +00:00
parent 9ee7aa3243
commit d13b05eda8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=133812
5 changed files with 44 additions and 41 deletions

View File

@ -6,8 +6,7 @@
#
PORTNAME= netspeed_applet
PORTVERSION= 0.10
PORTREVISION= 2
PORTVERSION= 0.12
CATEGORIES= net gnome
MASTER_SITES= http://www.wh-hms.uni-ulm.de/~mfcn/shared/netspeed/
@ -22,6 +21,7 @@ USE_GMAKE= yes
USE_GNOME= gnomehier intlhack gnomeprefix gnomehack gnomepanel
USE_LIBTOOL_VER=15
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
LDFLAGS="-L${LOCALBASE}/lib" \
PKG_CONFIG=${LOCALBASE}/bin/pkg-config
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
MD5 (netspeed_applet-0.10.tar.gz) = e6332b8ea135b560a8b84d7415728cdc
SIZE (netspeed_applet-0.10.tar.gz) = 577067
MD5 (netspeed_applet-0.12.tar.gz) = 14f55ff5bcdbd3186f05fc2e7fb48029
SIZE (netspeed_applet-0.12.tar.gz) = 585140

View File

@ -0,0 +1,29 @@
--- src/backend.c.orig Thu Apr 21 11:12:12 2005
+++ src/backend.c Thu Apr 21 11:23:38 2005
@@ -158,6 +158,7 @@
} else devinfo.ip = NULL;
/* Get the hardware/physical adress/ MAC */
+#ifndef __FreeBSD__
if (ioctl(fd, SIOCGIFHWADDR, &request) == 0) {
unsigned char hwaddr[6];
struct sockaddr *hwaddress = &request.ifr_hwaddr;
@@ -170,11 +171,17 @@
#else
hwaddr[5], hwaddr[4], hwaddr[3], hwaddr[2], hwaddr[1], hwaddr[0]);
#endif
- } else devinfo.hwaddr = NULL;
+ } else
+#endif
+ devinfo.hwaddr = NULL;
/* Get the subnetmask */
if (ioctl(fd, SIOCGIFNETMASK, &request) == 0) {
+#ifndef __FreeBSD__
struct sockaddr_in *address = (struct sockaddr_in*)&request.ifr_netmask;
+#else
+ struct sockaddr_in *address = (struct sockaddr_in*)&request.ifr_addr;
+#endif
devinfo.netmask = g_strdup_printf("%s", inet_ntoa(address->sin_addr));
} else devinfo.netmask = NULL;

View File

@ -0,0 +1,10 @@
--- src/backend.h.orig Thu Apr 21 11:25:48 2005
+++ src/backend.h Thu Apr 21 11:12:39 2005
@@ -25,6 +25,7 @@
#include <unistd.h>
#include <string.h>
#include <ctype.h>
+#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

View File

@ -1,36 +0,0 @@
--- src/netspeed.c.orig Sat Feb 8 23:21:50 2003
+++ src/netspeed.c Sat Feb 8 23:22:42 2003
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
@@ -260,6 +261,7 @@
devinfo->ip = NULL;
/* Get the hardware/physical adress/ MAC
*/
+#ifndef __FreeBSD__
if (ioctl(fd, SIOCGIFHWADDR, &request) == 0)
{
unsigned char hwaddr[6];
@@ -275,12 +277,17 @@
#endif
}
else
+#endif
devinfo->hwaddr = NULL;
/* Get the subnetmask
*/
if (ioctl(fd, SIOCGIFNETMASK, &request) == 0)
{
+#ifdef __FreeBSD__
+ struct sockaddr_in *address = (struct sockaddr_in*)&request.ifr_addr;
+#else
struct sockaddr_in *address = (struct sockaddr_in*)&request.ifr_netmask;
+#endif
devinfo->netmask = g_strdup_printf("%s", inet_ntoa(address->sin_addr));
}
else