From c200b10b5d5e122be351b67af224adc6128af5bf Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 22 Oct 2016 20:22:21 +0200 Subject: [PATCH] unix: Add FADV_* constants for linux/arm This is a followup commit for 9eef40adf05b951699605195b829612bd7b69952 and adds the constants needed for fadvise() on Linux for ARM that were missing. Fixes golang/go#16816 Change-Id: Ib7409f48bc07511d7014cb5791a6cc117a9a471e Reviewed-on: https://go-review.googlesource.com/31641 Reviewed-by: Brad Fitzpatrick Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- unix/ztypes_linux_arm.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/unix/ztypes_linux_arm.go b/unix/ztypes_linux_arm.go index 817ac9c2..35f11bd1 100644 --- a/unix/ztypes_linux_arm.go +++ b/unix/ztypes_linux_arm.go @@ -1,6 +1,6 @@ // +build arm,linux // Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_linux.go +// cgo -godefs types_linux.go | go run mkpost.go package unix @@ -155,6 +155,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