Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Nov 2013 19:04:38 +0000 (UTC)
From:      Koop Mast <kwm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r334115 - head/devel/libgtop/files
Message-ID:  <201311171904.rAHJ4cXs023282@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kwm
Date: Sun Nov 17 19:04:38 2013
New Revision: 334115
URL: http://svnweb.freebsd.org/changeset/ports/334115

Log:
  Fix the build on 11.0.
  
  Submitted by:	marcus@

Added:
  head/devel/libgtop/files/patch-sysdeps_freebsd_netload.c   (contents, props changed)

Added: head/devel/libgtop/files/patch-sysdeps_freebsd_netload.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libgtop/files/patch-sysdeps_freebsd_netload.c	Sun Nov 17 19:04:38 2013	(r334115)
@@ -0,0 +1,32 @@
+--- sysdeps/freebsd/netload.c.orig	2013-11-13 14:46:58.000000000 -0500
++++ sysdeps/freebsd/netload.c	2013-11-13 15:01:52.000000000 -0500
+@@ -37,6 +37,7 @@
+ #include <net/if_types.h>
+ 
+ #ifdef HAVE_NET_IF_VAR_H
++#define _WANT_IFADDR 1
+ #include <net/if_var.h>
+ #endif
+ 
+@@ -116,7 +117,7 @@ glibtop_get_netload_p (glibtop *server, 
+         while (ifnetaddr)
+         {
+                 struct sockaddr_in *sin;
+-                register char *cp;
++                register uint8_t *cp;
+                 u_long ifaddraddr;
+ 
+                 {
+@@ -201,10 +202,10 @@ glibtop_get_netload_p (glibtop *server, 
+ 				continue;
+ 			}
+ 
+-#define CP(x) ((char *)(x))
++#define CP(x) ((uint8_t *)(x))
+                         cp = (CP(ifaddr.ifa.ifa_addr) - CP(ifaddraddr)) +
+                              CP(&ifaddr);
+-                        sa = (struct sockaddr *)cp;
++                        sa = (struct sockaddr *) cp;
+ 
+                         if (sa->sa_family == AF_LINK) {
+                                 struct sockaddr_dl *dl = (struct sockaddr_dl *) sa;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311171904.rAHJ4cXs023282>