mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-06 13:41:36 +00:00
Remove all darwin specific files and use more generic _unsupported with build tags.
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
This commit is contained in:
+4
-2
@@ -24,10 +24,12 @@ func TreeSize(dir string) (size int64, err error) {
|
||||
|
||||
// Check inode to handle hard links correctly
|
||||
inode := fileInfo.Sys().(*syscall.Stat_t).Ino
|
||||
if _, exists := data[inode]; exists {
|
||||
// inode is not a uint64 on all platforms. Cast it to avoid issues.
|
||||
if _, exists := data[uint64(inode)]; exists {
|
||||
return nil
|
||||
}
|
||||
data[inode] = false
|
||||
// inode is not a uint64 on all platforms. Cast it to avoid issues.
|
||||
data[uint64(inode)] = false
|
||||
|
||||
size += s
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// +build: !linux !amd64
|
||||
package utils
|
||||
|
||||
import (
|
||||
@@ -9,5 +10,5 @@ type Utsname struct {
|
||||
}
|
||||
|
||||
func uname() (*Utsname, error) {
|
||||
return nil, errors.New("Kernel version detection is not available on darwin")
|
||||
return nil, errors.New("Kernel version detection is available only on linux")
|
||||
}
|
||||
Reference in New Issue
Block a user