diff --git a/providers/darwin/arch_darwin.go b/providers/darwin/arch_darwin_amd64.go similarity index 100% rename from providers/darwin/arch_darwin.go rename to providers/darwin/arch_darwin_amd64.go diff --git a/providers/darwin/boottime_darwin.go b/providers/darwin/boottime_darwin_amd64.go similarity index 94% rename from providers/darwin/boottime_darwin.go rename to providers/darwin/boottime_darwin_amd64.go index 141ae06a..fb276bb2 100644 --- a/providers/darwin/boottime_darwin.go +++ b/providers/darwin/boottime_darwin_amd64.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +build darwin,amd64,cgo + package darwin import ( @@ -24,7 +26,7 @@ import ( const kernBoottimeMIB = "kern.boottime" func BootTime() (time.Time, error) { - var tv syscall.Timeval32 + var tv syscall.Timeval if err := sysctlByName(kernBoottimeMIB, &tv); err != nil { return time.Time{}, errors.Wrap(err, "failed to get host uptime") } diff --git a/providers/darwin/host_darwin.go b/providers/darwin/host_darwin_amd64.go similarity index 98% rename from providers/darwin/host_darwin.go rename to providers/darwin/host_darwin_amd64.go index 98260971..9f8a3c47 100644 --- a/providers/darwin/host_darwin.go +++ b/providers/darwin/host_darwin_amd64.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +build darwin,amd64,cgo + package darwin import ( diff --git a/providers/darwin/kernel_darwin.go b/providers/darwin/kernel_darwin_amd64.go similarity index 100% rename from providers/darwin/kernel_darwin.go rename to providers/darwin/kernel_darwin_amd64.go diff --git a/providers/darwin/memory_darwin.go b/providers/darwin/memory_darwin_amd64.go similarity index 96% rename from providers/darwin/memory_darwin.go rename to providers/darwin/memory_darwin_amd64.go index 307f637c..6fa8d1e7 100644 --- a/providers/darwin/memory_darwin.go +++ b/providers/darwin/memory_darwin_amd64.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +build darwin,amd64,cgo + package darwin import ( diff --git a/providers/darwin/process_darwin.go b/providers/darwin/process_darwin_amd64.go similarity index 99% rename from providers/darwin/process_darwin.go rename to providers/darwin/process_darwin_amd64.go index 31bc1784..7f630bed 100644 --- a/providers/darwin/process_darwin.go +++ b/providers/darwin/process_darwin_amd64.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +build darwin,amd64,cgo + package darwin // #cgo LDFLAGS:-lproc diff --git a/providers/darwin/process_darwin_test.go b/providers/darwin/process_darwin_amd64_test.go similarity index 97% rename from providers/darwin/process_darwin_test.go rename to providers/darwin/process_darwin_amd64_test.go index aa320e0c..70ed45c4 100644 --- a/providers/darwin/process_darwin_test.go +++ b/providers/darwin/process_darwin_amd64_test.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +build darwin,amd64,cgo + package darwin import ( diff --git a/providers/darwin/syscall_darwin.go b/providers/darwin/syscall_darwin_amd64.go similarity index 99% rename from providers/darwin/syscall_darwin.go rename to providers/darwin/syscall_darwin_amd64.go index 42fa1eb7..991ca3c1 100644 --- a/providers/darwin/syscall_darwin.go +++ b/providers/darwin/syscall_darwin_amd64.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +build darwin,amd64,cgo + package darwin // #cgo LDFLAGS:-lproc