Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glibc: guard more function declarations #22771

Merged
merged 5 commits into from
Feb 7, 2025

Conversation

chouquette
Copy link
Contributor

@chouquette chouquette commented Feb 5, 2025

Guard the declaration of:

  • close_range (introduced in 2.34)
  • statx (introduced in 2.28)
  • fsopen, fsmount, move_mount, fsconfig, fspick, open_tree, mount_setattr (introduced in 2.36)
  • pidfd_open, pidfd_getfd, pidfd_send_signal (introduced in `2.36)
  • pidfd_getpid (introduced in 2.39)

This fixes building util-linuxwhile targeting glibc2.17` (or any version prior to 2.39)

Copy link
Contributor

@rootbeer rootbeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the version guards with the release notes, and they all look good. Your commit summary mentions close_range is in v2.36, but the diff and the truth are v2.34.

While reading the v2.39 release notes, I noticed pidfd_spawn and pidfd_spawnp were also added (in lib/libc/include/generic-glibc/bits/spawn_ext.h), if you want to cover a couple more while you're here ... But feel free to leave these for later/never.

I'm not a deputized reviewer, so feel free to ignore me.

@chouquette chouquette force-pushed the chouquette/glibc_guard branch from 13fc810 to 04bd6ed Compare February 6, 2025 09:06
It is only available starting from glibc 2.34
It was added in glibc 2.28
@chouquette chouquette force-pushed the chouquette/glibc_guard branch from 04bd6ed to 2c59b3b Compare February 6, 2025 09:09
@chouquette
Copy link
Contributor Author

Thank you both for your reviews! All comments should be addressed now

@chouquette chouquette force-pushed the chouquette/glibc_guard branch from 2c59b3b to edee702 Compare February 6, 2025 17:01
Copy link
Contributor

@rootbeer rootbeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I'm just a drive-by reviewer.

@alexrp alexrp enabled auto-merge February 6, 2025 22:25
@alexrp alexrp merged commit 8ad0732 into ziglang:master Feb 7, 2025
9 of 10 checks passed
@chouquette chouquette deleted the chouquette/glibc_guard branch February 7, 2025 14:12
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.

3 participants