Fix freebsd build

This brings freebsd in line with Darwin, ie it builds, but some parts may not yet
be fully functional. There is now a WIP `runc` port for FreeBSD at
https://github.com/clovertrail/runc/tree/1501-SupportOnFreeBSD so should be able
to test further.

Signed-off-by: Justin Cormack <justin@specialbusservice.com>
This commit is contained in:
Justin Cormack
2018-12-16 14:27:42 +00:00
parent c7e31f1c5e
commit 8be05eb237
4 changed files with 75 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
// +build !linux,!windows,!darwin
// +build freebsd
/*
Copyright The containerd Authors.
@@ -39,5 +39,8 @@ func setupSignals() (chan os.Signal, error) {
}
func newServer() (*ttrpc.Server, error) {
return ttrpc.NewServer(ttrpc.WithServerHandshaker(ttrpc.UnixSocketRequireSameUser()))
// for freebsd, we omit the socket credentials because these syscalls are
// slightly different. since we don't have freebsd support yet, this can be
// implemented later and the build can continue without issue.
return ttrpc.NewServer()
}