Support AIX in mlock package#187
Open
pgimalac wants to merge 1 commit into
Open
Conversation
mlock_unix.go: add aix to supported platforms (mlockall(2) and MCL_CURRENT/ MCL_FUTURE are available on AIX, and golang.org/x/sys/unix exports Mlockall for aix/ppc64). Also add the modern //go:build tag alongside the legacy // +build comment. mlock_unavail.go: switch from enumerating unsupported platforms to negating supported ones, so new platforms (like aix) are covered automatically once added to mlock_unix.go rather than requiring a separate change here.
gh-worker-dd-mergequeue-cf854d Bot
pushed a commit
to DataDog/datadog-agent
that referenced
this pull request
Jul 7, 2026
### What does this PR do? Adds `//go:build !aix` to `cmd/secret-generic-connector/backend/hashicorp/vault_test.go`. ### Motivation Caught by cross-linting with `GOOS=aix GOARCH=ppc64` (see #53214). The test file imports `github.com/hashicorp/vault/http`, which transitively depends on `github.com/hashicorp/go-secure-stdlib/mlock`. That package is missing an implementation for AIX (clearly forgotten in build tags list), so it doesn't compile. ### Describe how you validated your changes `GOOS=aix GOARCH=ppc64 dda inv linter.go --targets=./cmd/secret-generic-connector/...` ### Additional notes Opened hashicorp/go-secure-stdlib#187 to fix the compilation issue upstream Co-authored-by: pierre.gimalac <pierre.gimalac@datadoghq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
👋 Hello, this PR adds
aixto the list of build tags inmlock/mlock_unix.go, and updates the fallback filemlock/mlock_unavail.goto use the negated list of build tags frommlock/mlock_unix.go.Currently,
aixis missing from both files, so the package fails to compile on AIX.Those changes fix it, and using the negated list as a fallback prevents issues for new operating systems supported by Go.
PCI review checklist
If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
If applicable, I've worked with GRC to document the impact of any changes to security controls.
Examples of changes to controls include access controls, encryption, logging, etc.
If applicable, I've worked with GRC to ensure compliance due to a significant change to the in-scope PCI environment.
Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.