Skip to content

Commit e2a7a99

Browse files
authored
Merge pull request #1809 from Lomanic/issue1806
[net][host][aix] Fix build and Makefile
2 parents b7c02ad + ad534c2 commit e2a7a99

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ build_test: ## test only buildable
3434
GOOS=netbsd go test ./... | $(BUILD_FAIL_PATTERN)
3535
GOOS=openbsd go test ./... | $(BUILD_FAIL_PATTERN)
3636
GOOS=plan9 go test ./... | $(BUILD_FAIL_PATTERN)
37+
CGO_ENABLED=0 GOOS=aix GOARCH=ppc64 go test ./... | $(BUILD_FAIL_PATTERN)
3738

3839
ifeq ($(shell uname -s), Darwin)
3940
CGO_ENABLED=1 GOOS=darwin go test ./... | $(BUILD_FAIL_PATTERN)
@@ -77,6 +78,8 @@ vet:
7778
GOOS=plan9 GOARCH=amd64 go vet ./...
7879
GOOS=plan9 GOARCH=386 go vet ./...
7980

81+
CGO_ENABLED=0 GOOS=aix GOARCH=ppc64 go vet ./...
82+
8083
macos_test:
8184
CGO_ENABLED=0 GOOS=darwin go test ./... | $(BUILD_FAIL_PATTERN)
8285
CGO_ENABLED=1 GOOS=darwin go test ./... | $(BUILD_FAIL_PATTERN)

host/host_aix.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func parseUptime(uptime string) uint64 {
110110
if err != nil {
111111
return 0
112112
}
113-
case ut[3] == "mins," || ut[3] == "mins,":
113+
case ut[3] == "mins,":
114114
mins, err = strconv.ParseUint(ut[2], 10, 64)
115115
if err != nil {
116116
return 0

net/net_aix_cgo.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func IOCountersWithContext(ctx context.Context, pernic bool) ([]IOCountersStat,
3030
iocounters = append(iocounters, n)
3131
}
3232
if pernic == false {
33-
return getIOCountersAll(iocounters)
33+
return getIOCountersAll(iocounters), nil
3434
}
3535
return iocounters, nil
3636
}

net/net_aix_nocgo.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func IOCountersWithContext(ctx context.Context, pernic bool) ([]IOCountersStat,
8989
return nil, err
9090
}
9191
if pernic == false {
92-
return getIOCountersAll(iocounters)
92+
return getIOCountersAll(iocounters), nil
9393
}
9494
return iocounters, nil
9595
}

0 commit comments

Comments
 (0)