Skip to content

kernel_tainted: use linux build tag instead of !windows#847

Open
arunsrini3082 wants to merge 1 commit into
prometheus:masterfrom
arunsrini3082:fix-kernel-tainted-build-tag
Open

kernel_tainted: use linux build tag instead of !windows#847
arunsrini3082 wants to merge 1 commit into
prometheus:masterfrom
arunsrini3082:fix-kernel-tainted-build-tag

Conversation

@arunsrini3082

Copy link
Copy Markdown
Contributor

util.SysReadUintFromFile is defined in internal/util/sysreadfile.go
with a //go:build linux constraint. The previous !windows tag caused
build failures on OpenBSD and other non-Linux, non-Windows platforms
(seen in node_exporter crossbuild CI).

/proc/sys/kernel/tainted is Linux-specific, so linux is the correct
build constraint.

Fixes: #844 follow-up

util.SysReadUintFromFile is defined in internal/util/sysreadfile.go
which has a //go:build linux constraint. Using !windows caused build
failures on OpenBSD and other non-Linux, non-Windows platforms.

/proc/sys/kernel/tainted is Linux-specific, so linux is the correct
build tag.

Signed-off-by: Arun Srinivasan <arun.srinivasan@flipkart.com>
Signed-off-by: Arun S <arun.srinivasan@flipkart.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant