Skip to content

Commit df276a8

Browse files
authored
Merge pull request #682 from bmeneguele/fix-bsd
Fix build for BSD OSes family
2 parents f1a6b7d + f63883f commit df276a8

3 files changed

Lines changed: 6 additions & 11 deletions

File tree

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
// This file contains Darwin (MacOS) specific calls.
1+
// This file contains Darwin (MacOS) and *BSD specific calls.
22

3-
// +build darwin
3+
// +build freebsd openbsd dragonfly darwin
44

55
package cmd
66

77
// Unfortunatelly MacOS don't have the DUP3() system call, which is forced
88
// by Linux ARM64 not having the DUP2() anymore. With that, we need to
99
// repeat the other code and func declarations that are the same.
1010

11-
// FIXME: there MUST be some better way to do that... only dupFD2() should be
12-
// here.
11+
// FIXME: there MUST be some better way to do that... only dupFD2() should
12+
// be here.
1313

1414
import "syscall"
1515

cmd/util_unix.go renamed to cmd/util_linux.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
// This file contains Linux specific calls.
22

3-
// +build !windows,!darwin
4-
53
package cmd
64

75
// Since we're using some system calls that are platform-specific, we need
8-
// to make sure we have a small layer of compatibility for Unix-like and
9-
// Windows operating systems. For now, this file is still valid for BSDs
10-
// (MacOS NOT included)
6+
// to make sure we have a small layer of compatibility for Linux, Windows
7+
// and *BSD operating systems.
118

129
import "syscall"
1310

cmd/util_windows.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// This file contains Windows specific calls.
22

3-
// +build windows
4-
53
package cmd
64

75
// Even though Windows has a POSIX layer, it's implemented in userspace and,

0 commit comments

Comments
 (0)