You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
因google 的go语言本身不支持PPC32的芯片,所以在ppc32 上使用gcc-go编译成功,主要为老工控机使用,哈哈!!!目前运营正常!
建立zsys_linux_ppc.go 在$GOPATH/src/github.com/golang/net/internal/socket/下,内容
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs defs_linux.go
package socket
const (
sysAF_UNSPEC = 0x0
sysAF_INET = 0x2
sysAF_INET6 = 0xa
)
type iovec struct {
Base *byte
Len uint32
}
type msghdr struct {
Name *byte
Namelen uint32
Pad_cgo_0 [4]byte
Iov *iovec
Iovlen uint32
Control *byte
Controllen uint32
Flags int32
Pad_cgo_1 [4]byte
}
type mmsghdr struct {
Hdr msghdr
Len uint32
Pad_cgo_0 [4]byte
}
type cmsghdr struct {
Len uint32
Level int32
Type int32
}
type sockaddrInet struct {
Family uint16
Port uint16
Addr [4]byte /* in_addr */
X__pad [8]uint8
}
type sockaddrInet6 struct {
Family uint16
Port uint16
Flowinfo uint32
Addr [16]byte /* in6_addr */
Scope_id uint32
}
const (
sizeofIovec = 0x10
sizeofMsghdr = 0x38
sizeofMmsghdr = 0x40
sizeofCmsghdr = 0x10
)
建立sys_linux_ppc.go 在$GOPATH/src/github.com/golang/net/internal/socket/下,内容
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package socket
const (
sysRECVMMSG = 0x157
sysSENDMMSG = 0x15d
)
修改msghdr_linux_32bit.go 在$GOPATH/src/github.com/golang/net/internal/socket/下 +build 增加 ppc
修改iovec_32bit.go 在$GOPATH/src/github.com/golang/net/internal/socket/下 +build 增加ppc
修改cmsghdr_linux_32bit.go 在$GOPATH/src/github.com/golang/net/internal/socket/下 +build 增加ppc
The text was updated successfully, but these errors were encountered: