Skip to content

[Backport 2.33-maintenance] libutil: fix linux build on fresh glibc and gcc#15012

Merged
internal-nix-ci[bot] merged 1 commit into2.33-maintenancefrom
backport-15011-to-2.33-maintenance
Jan 17, 2026
Merged

[Backport 2.33-maintenance] libutil: fix linux build on fresh glibc and gcc#15012
internal-nix-ci[bot] merged 1 commit into2.33-maintenancefrom
backport-15011-to-2.33-maintenance

Conversation

@internal-nix-ci
Copy link

Automatic backport to 2.33-maintenance, triggered by a label in #15011.

Without the change the build fails for me as:

    ../unix/file-descriptor.cc:404:70: error: 'RESOLVE_BENEATH' was not declared in this scope
      404 |         dirFd, path.rel_c_str(), flags, static_cast<uint64_t>(mode), RESOLVE_BENEATH | RESOLVE_NO_SYMLINKS);
          |                                                                      ^~~~~~~~~~~~~~~

This happens for 2 reasons:
1. `__NR_openat2` constant was not pulled in from the according headers
   and as a result `<linux/openat2.h>` was not included.
2. `define HAVE_OPENAT2 0` build is broken: refers to missing
   `RESOLVE_BENEATH` normally pulled in from `<linux/openat2.h>`

This changes fixes both.

(cherry picked from commit 3256aba)
@internal-nix-ci internal-nix-ci bot requested a review from edolstra as a code owner January 17, 2026 18:01
@internal-nix-ci internal-nix-ci bot enabled auto-merge January 17, 2026 18:01
@internal-nix-ci internal-nix-ci bot merged commit ad5cd0b into 2.33-maintenance Jan 17, 2026
19 checks passed
@internal-nix-ci internal-nix-ci bot deleted the backport-15011-to-2.33-maintenance branch January 17, 2026 18:47
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