-
Simon McVittie authored
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 https://github.com/flatpak/flatpak/pull/5737 . Fixes: 6ada39c3 "backports: Add a backport of g_closefrom(), g_fdwalk_set_cloexec()" Signed-off-by:
Simon McVittie <smcv@collabora.com>
Simon McVittie authoredWhen 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 https://github.com/flatpak/flatpak/pull/5737 . Fixes: 6ada39c3 "backports: Add a backport of g_closefrom(), g_fdwalk_set_cloexec()" Signed-off-by:
Simon McVittie <smcv@collabora.com>