ports/135864: net/pload: fix to compile on FreeBSD-8

J.R. Oldroyd fbsd at opal.com
Sat Jun 20 15:30:04 UTC 2009


>Number:         135864
>Category:       ports
>Synopsis:       net/pload: fix to compile on FreeBSD-8
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 20 15:30:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     J.R. Oldroyd
>Release:        FreeBSD 7.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD xx.opal.com 7.2-STABLE FreeBSD 7.2-STABLE #1: Sun Jun 14 11:33:09 EDT 2009 xx at xx.opal.com:/usr/obj/amd64/usr/src/sys/XX amd64
>Description:
net/pload: fix to compile on FreeBSD-8
>How-To-Repeat:
>Fix:
diff -ruN /usr/ports/net/pload/Makefile net/pload/Makefile
--- /usr/ports/net/pload/Makefile	2009-06-13 06:34:30.000000000 -0400
+++ net/pload/Makefile	2009-06-15 15:32:02.000000000 -0400
@@ -7,10 +7,10 @@
 
 PORTNAME=	pload
 PORTVERSION=	0.9.5
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	net sysutils
 MASTER_SITES=	${MASTER_SITE_LOCAL} \
-		http://opal.com/freebsd/ports/net/pload/
+		http://opal.com/jr/freebsd/ports/net/pload/
 MASTER_SITE_SUBDIR=	pav
 
 MAINTAINER=	fbsd at opal.com
@@ -24,10 +24,4 @@
 MANCOMPRESSED=	yes
 PLIST_FILES=	bin/pload
 
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 800064
-BROKEN=		does not build
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff -ruN /usr/ports/net/pload/files/patch-ioctl_stats.c net/pload/files/patch-ioctl_stats.c
--- /usr/ports/net/pload/files/patch-ioctl_stats.c	2004-10-18 16:41:21.000000000 -0400
+++ net/pload/files/patch-ioctl_stats.c	2009-06-15 15:30:10.000000000 -0400
@@ -1,5 +1,5 @@
---- ioctl_stat.c.orig	Tue Feb  1 08:11:24 2000
-+++ ioctl_stat.c	Mon Oct 18 22:32:49 2004
+--- ioctl_stat.c.orig	2000-02-01 02:11:24.000000000 -0500
++++ ioctl_stat.c	2009-06-15 15:30:03.000000000 -0400
 @@ -30,6 +30,12 @@
  #include <fcntl.h>		/* open */
  #include <sys/ioctl.h>		/* ioctl */
@@ -13,10 +13,23 @@
  
  #ifndef STREAMS				/* Linux, FreeBSD, NetBSD, Ultrix */
  #	include <sys/socket.h>		/* socket */
-@@ -63,6 +69,16 @@
+@@ -39,8 +45,10 @@
+ #		include <linux/if_ppp.h>
+ #	else				/* most everything else */
+ #		include <net/if.h>
+-#		include <net/ppp_defs.h>
+-#		include <net/if_ppp.h>
++#		if !defined(__FreeBSD__)
++#			include <net/ppp_defs.h>
++#			include <net/if_ppp.h>
++#		endif /* ! __FreeBSD__ */
+ #	endif	/* linux && __GLIBC__ < 2 */
+ #else	/* STREAMS */			/* Solaris, SunOS, OSF/1, SVR4 */
+ #	include <net/ppp_defs.h>
+@@ -61,8 +69,18 @@
+ void ioctl_stat(if_data *ifd)
+ {
  	struct ifreq ifr;
- 	struct ifpppstatsreq req;
- 	
 +#ifdef __FreeBSD__
 +	static int		if_ix = -1;
 +	struct ifmibdata	ifmd;
@@ -25,12 +38,25 @@
 +	size_t			nr_ifs_sz = sizeof(nr_ifs);
 +	int			name[6];
 +	int			i;
++#else
+ 	struct ifpppstatsreq req;
+-	
 +#endif
 +
  	if (!ifd->s) getsocket(ifd);
  	
  	memset(&ifr, 0, sizeof(ifr));
-@@ -84,18 +100,36 @@
+@@ -76,7 +94,9 @@
+ 		return;
+ 	}
+ 	
++#ifndef __FreeBSD__
+ 	memset(&req, 0, sizeof(req));
++#endif
+ 
+ #ifdef linux
+ 	req.stats_ptr = (caddr_t) &req.stats;
+@@ -84,18 +104,36 @@
  #define ifr_name ifr__name
  #endif	
  
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list