diff options
author | jlaffaye <jlaffaye@FreeBSD.org> | 2015-09-02 04:41:30 +0800 |
---|---|---|
committer | jlaffaye <jlaffaye@FreeBSD.org> | 2015-09-02 04:41:30 +0800 |
commit | a5affce185594ddc2ee815ce8fe153f0a19d7253 (patch) | |
tree | 2bea549c21616d85f5090428d95dbc3ebc40910b /lang/go | |
parent | 9e44342d8d04c209d4a5a3892ffa95f5866c3f27 (diff) | |
download | freebsd-ports-gnome-a5affce185594ddc2ee815ce8fe153f0a19d7253.tar.gz freebsd-ports-gnome-a5affce185594ddc2ee815ce8fe153f0a19d7253.tar.zst freebsd-ports-gnome-a5affce185594ddc2ee815ce8fe153f0a19d7253.zip |
Fix net package on CURRENT
PR: 202504
Submitted by: Maciej Pasternacki <maciej@pasternacki.net>
Diffstat (limited to 'lang/go')
-rw-r--r-- | lang/go/Makefile | 5 | ||||
-rw-r--r-- | lang/go/files/struct-if_data-patch | 261 |
2 files changed, 266 insertions, 0 deletions
diff --git a/lang/go/Makefile b/lang/go/Makefile index 901bcc055996..a92789b729cd 100644 --- a/lang/go/Makefile +++ b/lang/go/Makefile @@ -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 diff --git a/lang/go/files/struct-if_data-patch b/lang/go/files/struct-if_data-patch new file mode 100644 index 000000000000..4dd1a204396e --- /dev/null +++ b/lang/go/files/struct-if_data-patch @@ -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 { |