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

utils: Avoid shadowing the names of global functions #661

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

smcv
Copy link
Collaborator

@smcv smcv commented Oct 3, 2024

dirfd() and socket() are POSIX standard library functions, so use dfd and sockfd instead.


This fixes build failures with gcc 4.6 in an Ubuntu 12.04 derivative, but seems like a good cleanup change to make the code easier to understand, even if gcc no longer warns about this particular collision.

Unfortunately this is going to conflict with #659, although the conflict resolution is simple and obvious.

cc @refi64

@swick
Copy link
Contributor

swick commented Oct 7, 2024

LGTM

@smcv smcv marked this pull request as draft October 8, 2024 12:32
dirfd() and socket() are POSIX standard library functions, so use dfd
and sockfd instead.

Signed-off-by: Simon McVittie <[email protected]>
@smcv smcv marked this pull request as ready for review October 8, 2024 12:37
@smcv smcv merged commit 812cc7f into containers:main Oct 8, 2024
4 checks passed
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.

2 participants