Skip to content

Commit 0cb062e

Browse files
authored
Merge pull request #63 from xhit/fix-build
Fix build in some OSes
2 parents e12e2e9 + 26cd67c commit 0cb062e

File tree

6 files changed

+24
-5
lines changed

6 files changed

+24
-5
lines changed

copy_namedpipes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build !windows
1+
// +build !windows,!plan9,!netbsd,!aix,!illumos,!solaris
22

33
package copy
44

copy_namedpipes_windows.go renamed to copy_namedpipes_x.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
// +build windows
1+
// +build windows plan9 netbsd aix illumos solaris
22

33
package copy
44

55
import (
66
"os"
77
)
88

9+
// TODO: check plan9 netbsd aix illumos solaris in future
10+
911
// pcopy is for just named pipes. Windows doesn't support them
1012
func pcopy(dest string, info os.FileInfo) error {
1113
return nil

stat_times.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build !windows,!darwin,!freebsd
1+
// +build !windows,!darwin,!freebsd,!plan9,!netbsd
22

33
// TODO: add more runtimes
44

stat_times_x.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// +build plan9 netbsd
2+
3+
package copy
4+
5+
import (
6+
"os"
7+
)
8+
9+
// TODO: check plan9 netbsd in future
10+
func getTimeSpec(info os.FileInfo) timespec {
11+
times := timespec{
12+
Mtime: info.ModTime(),
13+
Atime: info.ModTime(),
14+
Ctime: info.ModTime(),
15+
}
16+
return times
17+
}

test_setup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build !windows
1+
// +build !windows,!plan9,!netbsd,!aix,!illumos,!solaris
22

33
package copy
44

test_setup_windows.go renamed to test_setup_x.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build windows
1+
// +build windows plan9 netbsd aix illumos solaris
22

33
package copy
44

0 commit comments

Comments
 (0)