unix: don't export padding fields on DragonflyBSD

Re-run ./mkall.sh to avoid exporting Pad_cgo* fields on dragonfly/amd64.
This also adds some additional RLIMIT_* constants.

Updates golang/go#18632

Change-Id: I7969d8ab12c07befd7b1ff0d1dbc67f6622c39b1
Reviewed-on: https://go-review.googlesource.com/100595
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Tobias Klauser
2018-03-14 12:38:51 +00:00
committed by Tobias Klauser
parent 0edb963348
commit bcaab34b51
2 changed files with 53 additions and 50 deletions

View File

@@ -980,7 +980,10 @@ const (
RLIMIT_CPU = 0x0
RLIMIT_DATA = 0x2
RLIMIT_FSIZE = 0x1
RLIMIT_MEMLOCK = 0x6
RLIMIT_NOFILE = 0x8
RLIMIT_NPROC = 0x7
RLIMIT_RSS = 0x5
RLIMIT_STACK = 0x3
RLIM_INFINITY = 0x7fffffffffffffff
RTAX_AUTHOR = 0x6

View File

@@ -108,7 +108,7 @@ type Statfs_t struct {
Owner uint32
Type int32
Flags int32
Pad_cgo_0 [4]byte
_ [4]byte
Syncwrites int64
Asyncwrites int64
Fstypename [16]int8
@@ -118,7 +118,7 @@ type Statfs_t struct {
Spares1 int16
Mntfromname [80]int8
Spares2 int16
Pad_cgo_1 [4]byte
_ [4]byte
Spare [2]int64
}
@@ -219,10 +219,10 @@ type IPv6Mreq struct {
type Msghdr struct {
Name *byte
Namelen uint32
Pad_cgo_0 [4]byte
_ [4]byte
Iov *Iovec
Iovlen int32
Pad_cgo_1 [4]byte
_ [4]byte
Control *byte
Controllen uint32
Flags int32
@@ -294,14 +294,14 @@ const (
)
type IfMsghdr struct {
Msglen uint16
Version uint8
Type uint8
Addrs int32
Flags int32
Index uint16
Pad_cgo_0 [2]byte
Data IfData
Msglen uint16
Version uint8
Type uint8
Addrs int32
Flags int32
Index uint16
_ [2]byte
Data IfData
}
type IfData struct {
@@ -311,7 +311,7 @@ type IfData struct {
Hdrlen uint8
Recvquota uint8
Xmitquota uint8
Pad_cgo_0 [2]byte
_ [2]byte
Mtu uint64
Metric uint64
Link_state uint64
@@ -333,24 +333,24 @@ type IfData struct {
}
type IfaMsghdr struct {
Msglen uint16
Version uint8
Type uint8
Addrs int32
Flags int32
Index uint16
Pad_cgo_0 [2]byte
Metric int32
Msglen uint16
Version uint8
Type uint8
Addrs int32
Flags int32
Index uint16
_ [2]byte
Metric int32
}
type IfmaMsghdr struct {
Msglen uint16
Version uint8
Type uint8
Addrs int32
Flags int32
Index uint16
Pad_cgo_0 [2]byte
Msglen uint16
Version uint8
Type uint8
Addrs int32
Flags int32
Index uint16
_ [2]byte
}
type IfAnnounceMsghdr struct {
@@ -363,19 +363,19 @@ type IfAnnounceMsghdr struct {
}
type RtMsghdr struct {
Msglen uint16
Version uint8
Type uint8
Index uint16
Pad_cgo_0 [2]byte
Flags int32
Addrs int32
Pid int32
Seq int32
Errno int32
Use int32
Inits uint64
Rmx RtMetrics
Msglen uint16
Version uint8
Type uint8
Index uint16
_ [2]byte
Flags int32
Addrs int32
Pid int32
Seq int32
Errno int32
Use int32
Inits uint64
Rmx RtMetrics
}
type RtMetrics struct {
@@ -391,7 +391,7 @@ type RtMetrics struct {
Hopcount uint64
Mssopt uint16
Pad uint16
Pad_cgo_0 [4]byte
_ [4]byte
Msl uint64
Iwmaxsegs uint64
Iwcapsegs uint64
@@ -416,9 +416,9 @@ type BpfStat struct {
}
type BpfProgram struct {
Len uint32
Pad_cgo_0 [4]byte
Insns *BpfInsn
Len uint32
_ [4]byte
Insns *BpfInsn
}
type BpfInsn struct {
@@ -429,11 +429,11 @@ type BpfInsn struct {
}
type BpfHdr struct {
Tstamp Timeval
Caplen uint32
Datalen uint32
Hdrlen uint16
Pad_cgo_0 [6]byte
Tstamp Timeval
Caplen uint32
Datalen uint32
Hdrlen uint16
_ [6]byte
}
type Termios struct {