svn commit: r395798 - in head/lang/go: . files

Julien Laffaye jlaffaye at FreeBSD.org
Tue Sep 1 20:41:32 UTC 2015


Author: jlaffaye
Date: Tue Sep  1 20:41:30 2015
New Revision: 395798
URL: https://svnweb.freebsd.org/changeset/ports/395798

Log:
  Fix net package on CURRENT
  
  PR:		202504
  Submitted by:	Maciej Pasternacki <maciej at pasternacki.net>

Added:
  head/lang/go/files/struct-if_data-patch   (contents, props changed)
Modified:
  head/lang/go/Makefile

Modified: head/lang/go/Makefile
==============================================================================
--- head/lang/go/Makefile	Tue Sep  1 20:08:53 2015	(r395797)
+++ head/lang/go/Makefile	Tue Sep  1 20:41:30 2015	(r395798)
@@ -3,6 +3,7 @@
 
 PORTNAME=	go
 PORTVERSION=	1.5
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	lang
 MASTER_SITES=	http://golang.org/dl/
@@ -41,6 +42,10 @@ IGNORE=		unknown arch ${ARCH}
 
 PLIST_SUB+=	ARCH=${GOARCH}
 
+.if (${OSVERSION} >= 1100000)
+EXTRA_PATCHES+=	${FILESDIR}/struct-if_data-patch
+.endif
+
 post-patch:
 	@cd ${WRKSRC} && ${FIND} . -name '*.orig' -delete
 

Added: head/lang/go/files/struct-if_data-patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/go/files/struct-if_data-patch	Tue Sep  1 20:41:30 2015	(r395798)
@@ -0,0 +1,261 @@
+diff -ur go.orig/src/syscall/types_freebsd.go go/src/syscall/types_freebsd.go
+--- src/syscall/types_freebsd.go	2015-08-26 16:13:15.191076000 +0200
++++ src/syscall/types_freebsd.go	2015-08-26 16:13:44.079240000 +0200
+@@ -106,15 +106,16 @@
+ 
+ // This structure is a duplicate of if_data on FreeBSD 8-STABLE.
+ // See /usr/include/net/if.h.
++#undef ifi_epoch
++#undef ifi_lastchange
+ struct if_data8 {
+ 	u_char  ifi_type;
+ 	u_char  ifi_physical;
+ 	u_char  ifi_addrlen;
+ 	u_char  ifi_hdrlen;
+ 	u_char  ifi_link_state;
+-	u_char  ifi_spare_char1;
+-	u_char  ifi_spare_char2;
+-	u_char  ifi_datalen;
++	u_char  ifi_vhid;
++	u_short ifi_datalen;
+ 	u_long  ifi_mtu;
+ 	u_long  ifi_metric;
+ 	u_long  ifi_baudrate;
+diff -ur go.orig/src/syscall/ztypes_freebsd_386.go go/src/syscall/ztypes_freebsd_386.go
+--- src/syscall/ztypes_freebsd_386.go	2015-08-26 16:13:15.209213000 +0200
++++ src/syscall/ztypes_freebsd_386.go	2015-08-26 17:14:32.558231000 +0200
+@@ -280,9 +280,9 @@
+ }
+ 
+ const (
+-	sizeofIfMsghdr         = 0x64
++	sizeofIfMsghdr         = 0xa8
+ 	SizeofIfMsghdr         = 0x60
+-	sizeofIfData           = 0x54
++	sizeofIfData           = 0x98
+ 	SizeofIfData           = 0x50
+ 	SizeofIfaMsghdr        = 0x14
+ 	SizeofIfmaMsghdr       = 0x10
+@@ -314,59 +314,60 @@
+ }
+ 
+ type ifData struct {
+-	Type        uint8
+-	Physical    uint8
+-	Addrlen     uint8
+-	Hdrlen      uint8
+-	Link_state  uint8
+-	Vhid        uint8
+-	Baudrate_pf uint8
+-	Datalen     uint8
+-	Mtu         uint32
+-	Metric      uint32
+-	Baudrate    uint32
+-	Ipackets    uint32
+-	Ierrors     uint32
+-	Opackets    uint32
+-	Oerrors     uint32
+-	Collisions  uint32
+-	Ibytes      uint32
+-	Obytes      uint32
+-	Imcasts     uint32
+-	Omcasts     uint32
+-	Iqdrops     uint32
+-	Noproto     uint32
+-	Hwassist    uint64
+-	Epoch       int32
+-	Lastchange  Timeval
++	Type              uint8
++	Physical          uint8
++	Addrlen           uint8
++	Hdrlen            uint8
++	Link_state        uint8
++	Vhid              uint8
++	Datalen           uint16
++	Mtu               uint32
++	Metric            uint32
++	Baudrate          uint64
++	Ipackets          uint64
++	Ierrors           uint64
++	Opackets          uint64
++	Oerrors           uint64
++	Collisions        uint64
++	Ibytes            uint64
++	Obytes            uint64
++	Imcasts           uint64
++	Omcasts           uint64
++	Iqdrops           uint64
++	Oqdrops           uint64
++	Noproto           uint64
++	Hwassist          uint64
++       Epoch             int32
++	X__ifi_epoch_pad  [4]byte
++       Lastchange        Timeval
++	X__ifi_lastchange_pad [8]byte
+ }
+ 
+ type IfData struct {
+-	Type        uint8
+-	Physical    uint8
+-	Addrlen     uint8
+-	Hdrlen      uint8
+-	Link_state  uint8
+-	Spare_char1 uint8
+-	Spare_char2 uint8
+-	Datalen     uint8
+-	Mtu         uint32
+-	Metric      uint32
+-	Baudrate    uint32
+-	Ipackets    uint32
+-	Ierrors     uint32
+-	Opackets    uint32
+-	Oerrors     uint32
+-	Collisions  uint32
+-	Ibytes      uint32
+-	Obytes      uint32
+-	Imcasts     uint32
+-	Omcasts     uint32
+-	Iqdrops     uint32
+-	Noproto     uint32
+-	Hwassist    uint32
+-	Epoch       int32
+-	Lastchange  Timeval
++	Type       uint8
++	Physical   uint8
++	Addrlen    uint8
++	Hdrlen     uint8
++	Link_state uint8
++	Vhid       uint8
++	Datalen    uint16
++	Mtu        uint32
++	Metric     uint32
++	Baudrate   uint32
++	Ipackets   uint32
++	Ierrors    uint32
++	Opackets   uint32
++	Oerrors    uint32
++	Collisions uint32
++	Ibytes     uint32
++	Obytes     uint32
++	Imcasts    uint32
++	Omcasts    uint32
++	Iqdrops    uint32
++	Noproto    uint32
++	Hwassist   uint32
++	Epoch      int32
++	Lastchange Timeval
+ }
+ 
+ type IfaMsghdr struct {
+diff -ur go.orig/src/syscall/ztypes_freebsd_amd64.go go/src/syscall/ztypes_freebsd_amd64.go
+--- src/syscall/ztypes_freebsd_amd64.go	2015-08-26 16:13:15.194477000 +0200
++++ src/syscall/ztypes_freebsd_amd64.go	2015-08-26 17:16:22.936248000 +0200
+@@ -316,59 +316,58 @@
+ }
+ 
+ type ifData struct {
+-	Type        uint8
+-	Physical    uint8
+-	Addrlen     uint8
+-	Hdrlen      uint8
+-	Link_state  uint8
+-	Vhid        uint8
+-	Baudrate_pf uint8
+-	Datalen     uint8
+-	Mtu         uint64
+-	Metric      uint64
+-	Baudrate    uint64
+-	Ipackets    uint64
+-	Ierrors     uint64
+-	Opackets    uint64
+-	Oerrors     uint64
+-	Collisions  uint64
+-	Ibytes      uint64
+-	Obytes      uint64
+-	Imcasts     uint64
+-	Omcasts     uint64
+-	Iqdrops     uint64
+-	Noproto     uint64
+-	Hwassist    uint64
+-	Epoch       int64
+-	Lastchange  Timeval
++	Type              uint8
++	Physical          uint8
++	Addrlen           uint8
++	Hdrlen            uint8
++	Link_state        uint8
++	Vhid              uint8
++	Datalen           uint16
++	Mtu               uint32
++	Metric            uint32
++	Baudrate          uint64
++	Ipackets          uint64
++	Ierrors           uint64
++	Opackets          uint64
++	Oerrors           uint64
++	Collisions        uint64
++	Ibytes            uint64
++	Obytes            uint64
++	Imcasts           uint64
++	Omcasts           uint64
++	Iqdrops           uint64
++	Oqdrops           uint64
++	Noproto           uint64
++	Hwassist          uint64
++	X__ifi_epoch      [8]byte
++	X__ifi_lastchange [16]byte
+ }
+ 
+ type IfData struct {
+-	Type        uint8
+-	Physical    uint8
+-	Addrlen     uint8
+-	Hdrlen      uint8
+-	Link_state  uint8
+-	Spare_char1 uint8
+-	Spare_char2 uint8
+-	Datalen     uint8
+-	Mtu         uint64
+-	Metric      uint64
+-	Baudrate    uint64
+-	Ipackets    uint64
+-	Ierrors     uint64
+-	Opackets    uint64
+-	Oerrors     uint64
+-	Collisions  uint64
+-	Ibytes      uint64
+-	Obytes      uint64
+-	Imcasts     uint64
+-	Omcasts     uint64
+-	Iqdrops     uint64
+-	Noproto     uint64
+-	Hwassist    uint64
+-	Epoch       int64
+-	Lastchange  Timeval
++	Type       uint8
++	Physical   uint8
++	Addrlen    uint8
++	Hdrlen     uint8
++	Link_state uint8
++	Vhid       uint8
++	Datalen    uint16
++	Mtu        uint64
++	Metric     uint64
++	Baudrate   uint64
++	Ipackets   uint64
++	Ierrors    uint64
++	Opackets   uint64
++	Oerrors    uint64
++	Collisions uint64
++	Ibytes     uint64
++	Obytes     uint64
++	Imcasts    uint64
++	Omcasts    uint64
++	Iqdrops    uint64
++	Noproto    uint64
++	Hwassist   uint64
++	Epoch      int64
++	Lastchange Timeval
+ }
+ 
+ type IfaMsghdr struct {


More information about the svn-ports-all mailing list