Commit 9eef40ad authored by Alexander Neumann's avatar Alexander Neumann Committed by Brad Fitzpatrick

unix: Add FADV_* constants

These constants are used for fadvise() on Linux and were missing from
the ztypes_linux_*.go files.

Including the bluetooth headers is necessary so that cgo can resolve
struct sockaddr_hci.

Fixes golang/go#15114

Change-Id: I1538b5a7b9b24f910c0520d446b2fa5bd8a09013
Reviewed-on: https://go-review.googlesource.com/21753Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent a80ff226
......@@ -55,6 +55,8 @@ package unix
#include <unistd.h>
#include <ustat.h>
#include <utime.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#ifdef TCSETS2
// On systems that have "struct termios2" use this as type Termios.
......
......@@ -151,6 +151,15 @@ type Flock_t struct {
Pid int32
}
const (
FADV_NORMAL = 0x0
FADV_RANDOM = 0x1
FADV_SEQUENTIAL = 0x2
FADV_WILLNEED = 0x3
FADV_DONTNEED = 0x4
FADV_NOREUSE = 0x5
)
type RawSockaddrInet4 struct {
Family uint16
Port uint16
......
......@@ -153,6 +153,15 @@ type Flock_t struct {
Pad_cgo_1 [4]byte
}
const (
FADV_NORMAL = 0x0
FADV_RANDOM = 0x1
FADV_SEQUENTIAL = 0x2
FADV_WILLNEED = 0x3
FADV_DONTNEED = 0x4
FADV_NOREUSE = 0x5
)
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