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

Fix missing declaration for g_fdwalk_set_cloexec() with GLib 2.80.x #5737

Merged
merged 1 commit into from Mar 21, 2024

Conversation

smcv
Copy link
Collaborator

@smcv smcv commented Mar 20, 2024

With older GLib, it's provided by libglnx, but with newer GLib, we need to include the correct header.

Fixes: 7b1cd20 "Replace flatpak_close_fds_workaround() with g_fdwalk_set_cloexec()"

@smcv
Copy link
Collaborator Author

smcv commented Mar 20, 2024

The CI failures are because we're consistently getting 503 Service Unavailable from the PPA we use to get a compatible backport of libostree. I'll retry another time.

@swick
Copy link
Contributor

swick commented Mar 20, 2024

LGTM

With older GLib, it's provided by libglnx, but with newer GLib, we need
to include the correct header.

Fixes: 7b1cd20 "Replace flatpak_close_fds_workaround() with g_fdwalk_set_cloexec()"
Signed-off-by: Simon McVittie <[email protected]>
@smcv smcv merged commit 2fc71b1 into flatpak:main Mar 21, 2024
9 checks passed
gnomesysadmins pushed a commit to GNOME/libglnx that referenced this pull request May 13, 2024
When compiling with GLib older than 2.80.x, we provide a compatibility
backport of g_closefrom() and g_fdwalk_set_cloexec(), but when compiling
with newer GLib, we rely on GLib to provide those.

The intended scope of libglnx (Linux only) is narrower than the scope
of `<glib-unix.h>` (any Unix platform), so we can safely include
`<glib-unix.h>` unconditionally. This provides least-astonishment by
having `#include <libglnx.h>` with newer GLib always provide a superset
of the functionality it provides with older GLib.

This would have avoided needing
flatpak/flatpak#5737.

Signed-off-by: Simon McVittie <[email protected]>
gnomesysadmins pushed a commit to GNOME/libglnx that referenced this pull request May 13, 2024
When compiling with GLib older than 2.80.x, we provide a compatibility
backport of g_closefrom() and g_fdwalk_set_cloexec(), but when compiling
with newer GLib, we rely on GLib to provide those.

The intended scope of libglnx (Linux only) is narrower than the scope
of `<glib-unix.h>` (any Unix platform), so we can safely include
`<glib-unix.h>` unconditionally. This provides least-astonishment by
having `#include <libglnx.h>` with newer GLib always provide a superset
of the functionality it provides with older GLib.

This would have avoided needing
flatpak/flatpak#5737.

Fixes: 6ada39c "backports: Add a backport of g_closefrom(), g_fdwalk_set_cloexec()"
Signed-off-by: Simon McVittie <[email protected]>
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.

None yet

3 participants