From 30c8eb85ab90df3c639bd37f37a688542f35de66 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 20 Jan 2020 14:39:52 +0000 Subject: [PATCH 1/3] gthread: Ensure GThreadSchedulerSettings is always defined MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s now used unconditionally for `shared_thread_scheduler_settings` in `gthreadpool.c`, so it actually needs to have a storage definition. Fixes a build failure on FreeBSD. Signed-off-by: Philip Withnall --- glib/gthreadprivate.h | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/glib/gthreadprivate.h b/glib/gthreadprivate.h index afbe75934..888b3766d 100644 --- a/glib/gthreadprivate.h +++ b/glib/gthreadprivate.h @@ -39,26 +39,18 @@ struct _GRealThread /* system thread implementation (gthread-posix.c, gthread-win32.c) */ /* Platform-specific scheduler settings for a thread */ -typedef struct _GThreadSchedulerSettings GThreadSchedulerSettings; - -/* TODO: Add the same for macOS and the BSDs */ +typedef struct +{ #if defined(HAVE_SYS_SCHED_GETATTR) -/* This is for modern Linux */ -struct _GThreadSchedulerSettings -{ + /* This is for modern Linux */ struct sched_attr *attr; -}; - -#define HAVE_GTHREAD_SCHEDULER_SETTINGS 1 - #elif defined(G_OS_WIN32) -struct _GThreadSchedulerSettings -{ gint thread_prio; -}; - -#define HAVE_GTHREAD_SCHEDULER_SETTINGS 1 +#else + /* TODO: Add support for macOS and the BSDs */ + void *dummy; #endif +} GThreadSchedulerSettings; void g_system_thread_wait (GRealThread *thread); From 03380a49286e267c974b583b1d2e5dc8e3a507d4 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 20 Jan 2020 15:22:03 +0000 Subject: [PATCH 2/3] tests: Fix header inclusion in win32-appinfo.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the following build failure on FreeBSD: ``` In file included from ../gio/tests/win32-appinfo.c:24: /usr/include/malloc.h:3:2: error: " has been replaced by " #error " has been replaced by " ``` Hopefully it doesn’t break Windows. Signed-off-by: Philip Withnall --- gio/tests/win32-appinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/tests/win32-appinfo.c b/gio/tests/win32-appinfo.c index 2036917dc..78052c348 100644 --- a/gio/tests/win32-appinfo.c +++ b/gio/tests/win32-appinfo.c @@ -21,7 +21,7 @@ #include #include -#include +#include #include "../giowin32-private.c" From df0610aa55fe1fe13b18249b29bcbd1523f780fd Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 20 Jan 2020 15:30:44 +0000 Subject: [PATCH 3/3] ci: Use --wrap-mode=default on macOS CI runner (only) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a partial revert of commit 595e12b5fb for macOS only, since we can’t run a VM image on that CI runner, and hence can’t easily pre-populate it with cached dependencies. Signed-off-by: Philip Withnall --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0a4d1f58d..50803ee09 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -366,7 +366,13 @@ macos: - export PATH=/Users/gitlabrunner/Library/Python/3.7/bin:$PATH script: # FIXME: Add --werror + # FIXME: Use --wrap-mode=default so we download dependencies each time, + # until the macOS runner is a VM where we can use a pre-made image which + # already contains the dependencies. See: + # - https://gitlab.gnome.org/GNOME/glib/merge_requests/388 + # - https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/225 - meson ${MESON_COMMON_OPTIONS} + --wrap-mode=default _build - ninja -C _build # FIXME: Multiple unit tests currently fails