Skip to content

Commit

Permalink
Fix build tags
Browse files Browse the repository at this point in the history
proc_maps.go and proc_maps_test.go import "golang.org/x/sys/unix", but
only guard against MS Windows in the build tag. However, that package
only works with the build tags also used in
golang.org/x/sys/unix/syscall.go.

This commits brings the build tags in line with that. The procfs
package then compiles again on all GOOS/GOARCH (but returns an error
for unsupported platforms, as expected by users like the
prometheus/client_golang process collector).

Cf. prometheus/client_golang#758

Signed-off-by: beorn7 <[email protected]>
  • Loading branch information
beorn7 committed May 27, 2020
1 parent 38af759 commit 98dd431
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion proc_maps.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// +build !windows
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris

package procfs

Expand Down
2 changes: 1 addition & 1 deletion proc_maps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// +build !windows
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris

package procfs

Expand Down

0 comments on commit 98dd431

Please sign in to comment.