Commit 055b588e authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

syscall: add Flock_t on Linux

Matches Darwin and the BSDs. This means leveldb-go, kv,
Camlistore, etc can stop defining these structs on Linux by
hand.

Update #7059

R=golang-codereviews, dave, iant
CC=golang-codereviews
https://golang.org/cl/53350043
parent 873aaa59
......@@ -32,3 +32,13 @@ func _() {
_ int = syscall.TCOFLUSH
)
}
func _() {
_ = syscall.Flock_t{
Type: int16(0),
Whence: int16(0),
Start: 0,
Len: 0,
Pid: int32(0),
}
}
......@@ -158,6 +158,8 @@ type Dirent C.struct_dirent
type Fsid C.fsid_t
type Flock_t C.struct_flock
// Sockets
type RawSockaddrInet4 C.struct_sockaddr_in
......
......@@ -142,6 +142,14 @@ type Fsid struct {
X__val [2]int32
}
type Flock_t struct {
Type int16
Whence int16
Start int64
Len int64
Pid int32
}
type RawSockaddrInet4 struct {
Family uint16
Port uint16
......
......@@ -142,6 +142,16 @@ type Fsid struct {
X__val [2]int32
}
type Flock_t struct {
Type int16
Whence int16
Pad_cgo_0 [4]byte
Start int64
Len int64
Pid int32
Pad_cgo_1 [4]byte
}
type RawSockaddrInet4 struct {
Family uint16
Port uint16
......
......@@ -144,6 +144,14 @@ type Fsid struct {
X__val [2]int32
}
type Flock_t struct {
Type int16
Whence int16
Start int64
Len int64
Pid int32
}
type RawSockaddrInet4 struct {
Family uint16
Port uint16
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment