mirror of
https://github.com/golang/sys.git
synced 2026-02-09 04:06:04 +03:00
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/21753 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
a80ff226bd
commit
9eef40adf0
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user