From 80dfa10a628126db82f1ebed95d414e50f1925ee Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Fri, 23 Aug 2013 09:45:37 -0700 Subject: [PATCH] github.com/cznic/fileutil: fix FreeBSD build. Fixes build broken in https://camlistore.org/gw/01ce3859291e9e012b497af13a4c2dd82d2d1d4f Change-Id: Ieede30ab41c6896f0b9964895ca7237fa6c34b5a --- .../cznic/fileutil/fileutil_freebsd.go | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 third_party/github.com/cznic/fileutil/fileutil_freebsd.go diff --git a/third_party/github.com/cznic/fileutil/fileutil_freebsd.go b/third_party/github.com/cznic/fileutil/fileutil_freebsd.go new file mode 100644 index 000000000..e51d57172 --- /dev/null +++ b/third_party/github.com/cznic/fileutil/fileutil_freebsd.go @@ -0,0 +1,23 @@ +// Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// blame: jnml, labs.nic.cz + +package fileutil + +import ( + "os" +) + +// PunchHole deallocates space inside a file in the byte range starting at +// offset and continuing for len bytes. Unimplemented on FreeBSD +func PunchHole(f *os.File, off, len int64) error { + return nil +} + +// Fadvise predeclares an access pattern for file data. See also 'man 2 +// posix_fadvise'. Unimplemented on FreeBSD +func Fadvise(f *os.File, off, len int64, advice FadviseAdvice) error { + return nil +}