From 8ed45a1a22937cc00f53952dac4ccffc6f821e31 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 13 May 2024 14:54:43 +0100 Subject: [PATCH] glnx-backports: Include `` 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 `` (any Unix platform), so we can safely include `` unconditionally. This provides least-astonishment by having `#include ` 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 --- glnx-backports.h | 1 + 1 file changed, 1 insertion(+) diff --git a/glnx-backports.h b/glnx-backports.h index c92ace46..09e4609a 100644 --- a/glnx-backports.h +++ b/glnx-backports.h @@ -28,6 +28,7 @@ #include +#include #include G_BEGIN_DECLS