wsutil: Check GLib version for g_spawn Linux bug

The g_spawn Linux bug was fixed in GLib 2.58.2
(https://gitlab.gnome.org/GNOME/glib/-/merge_requests/490)
so if we have that version or later we don't have to use
the workaround from commit 5e304f7718
This commit is contained in:
John Thacker 2024-01-02 08:44:03 -05:00 committed by AndersBroman
parent 73e5eeae50
commit caa9bfbe41
1 changed files with 2 additions and 0 deletions

View File

@ -29,12 +29,14 @@
#endif
#endif
#if !GLIB_CHECK_VERSION(2, 58, 2)
#ifdef __linux__
#define HAS_G_SPAWN_LINUX_THREAD_SAFETY_BUG
#include <fcntl.h>
#include <sys/syscall.h> /* for syscall and SYS_getdents64 */
#include <wsutil/file_util.h> /* for ws_open -> open to pacify checkAPIs.pl */
#endif
#endif
#include "wsutil/filesystem.h"
#include "wsutil/wslog.h"