Merge branch 'issue_3500' into 'main'

gmain: Include poll.h as early as possible, fixing build on AIX

Closes #3500

See merge request GNOME/glib!4355
This commit is contained in:
Philip Withnall 2024-10-19 09:39:21 +00:00
commit 1334e585e7

View File

@ -48,6 +48,15 @@
#define G_MAIN_POLL_DEBUG #define G_MAIN_POLL_DEBUG
#endif #endif
/* We need to include this as early as possible, because on some
* platforms like AIX, <poll.h> redefines the names we use for
* GPollFD struct members.
* See https://gitlab.gnome.org/GNOME/glib/-/issues/3500 */
#ifdef HAVE_POLL_H
#include <poll.h>
#endif
#ifdef G_OS_UNIX #ifdef G_OS_UNIX
#include "glib-unix.h" #include "glib-unix.h"
#include <pthread.h> #include <pthread.h>
@ -69,10 +78,6 @@
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#ifdef HAVE_POLL_H
#include <poll.h>
#endif
#ifdef HAVE_PIDFD #ifdef HAVE_PIDFD
#include <sys/syscall.h> #include <sys/syscall.h>
#include <sys/wait.h> #include <sys/wait.h>