From afbda14f2ccd812980473121ee247a9b2eb6bf54 Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Fri, 31 Aug 2018 09:52:29 -0500 Subject: [PATCH 1/5] gio: Don't redefine GKqueueFileMonitor Fixes build on old compilers that don't allow type redefinitions. Closes: https://gitlab.gnome.org/GNOME/glib/issues/1506 --- gio/kqueue/gkqueuefilemonitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gio/kqueue/gkqueuefilemonitor.c b/gio/kqueue/gkqueuefilemonitor.c index 3088296b5..67fafe1d9 100644 --- a/gio/kqueue/gkqueuefilemonitor.c +++ b/gio/kqueue/gkqueuefilemonitor.c @@ -75,7 +75,7 @@ typedef GLocalFileMonitorClass GKqueueFileMonitorClass; * * To distinguish between a directory monitor and a regular file monitor, check * whether sub_file is NULL. */ -typedef struct _GKqueueFileMonitor +struct _GKqueueFileMonitor { GLocalFileMonitor parent_instance; @@ -85,7 +85,7 @@ typedef struct _GKqueueFileMonitor GFileMonitor *fallback; GFile *fbfile; #endif -} GKqueueFileMonitor; +}; #ifdef __clang__ #pragma clang diagnostic pop From b8a4754d59189a57c1e576cf1404ea4f96cd27e8 Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Thu, 30 Aug 2018 18:04:35 -0500 Subject: [PATCH 2/5] gspawn: Fix build on systems without O_CLOEXEC Fixes typo introduced in 4afe429d7ce4d813e0b263fd3eab9e543f11d2a6. See https://gitlab.gnome.org/GNOME/glib/issues/1488 --- glib/gspawn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glib/gspawn.c b/glib/gspawn.c index e273e2a99..5d0c29d70 100644 --- a/glib/gspawn.c +++ b/glib/gspawn.c @@ -1485,7 +1485,7 @@ do_posix_spawn (gchar **argv, parent_close_fds[num_parent_close_fds++] = write_null; #ifndef HAVE_O_CLOEXEC - fcntl (read_null, F_SETFD, FD_CLOEXEC); + fcntl (write_null, F_SETFD, FD_CLOEXEC); #endif r = posix_spawn_file_actions_adddup2 (&file_actions, write_null, 1); @@ -1509,7 +1509,7 @@ do_posix_spawn (gchar **argv, parent_close_fds[num_parent_close_fds++] = write_null; #ifndef HAVE_O_CLOEXEC - fcntl (read_null, F_SETFD, FD_CLOEXEC); + fcntl (write_null, F_SETFD, FD_CLOEXEC); #endif r = posix_spawn_file_actions_adddup2 (&file_actions, write_null, 2); From f042610c0283dbca3671d0c1935f33b43ba7c691 Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Fri, 31 Aug 2018 15:58:38 +0200 Subject: [PATCH 3/5] build: fix installation dir of glib-gettextize --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index aa7d8e4f7..5812b21e9 100644 --- a/meson.build +++ b/meson.build @@ -1958,7 +1958,7 @@ if have_sh gettexize_conf.set('datadir', glib_datadir) configure_file(input : 'glib-gettextize.in', install : true, - install_dir : 'bin', + install_dir : glib_bindir, output : 'glib-gettextize', configuration : gettexize_conf) endif From a8babc792f6cbda250c0359a36aa017b5a38e483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 31 Aug 2018 20:04:41 +0200 Subject: [PATCH 4/5] portal network monitor: Always emit changed signal on changed The ::network-changed signal is documented to indicate any change in network configuration, which doesn't necessarily imply a property change - additional services becoming available after connecting to a VPN comes to mind for instance. In order to match the "native" network monitor's behavior, always emit the signal when it's in response to the 'changed' D-Bus signal. Also emit the signal unconditionally when loading the initial property values, to allow clients to differentiate between "offline" meaning "offline" and "offline" meaning "uninitialized". --- gio/gnetworkmonitorportal.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gio/gnetworkmonitorportal.c b/gio/gnetworkmonitorportal.c index 3c4c2f696..9a5820ab6 100644 --- a/gio/gnetworkmonitorportal.c +++ b/gio/gnetworkmonitorportal.c @@ -260,7 +260,6 @@ got_status (GObject *source, GNetworkMonitorPortal *nm = G_NETWORK_MONITOR_PORTAL (data); GError *error = NULL; GVariant *ret; - gboolean should_emit_changed = FALSE; GVariant *status; gboolean available; gboolean metered; @@ -297,14 +296,12 @@ got_status (GObject *source, { nm->priv->available = available; g_object_notify (G_OBJECT (nm), "network-available"); - should_emit_changed = TRUE; } if (nm->priv->metered != metered) { nm->priv->metered = metered; g_object_notify (G_OBJECT (nm), "network-metered"); - should_emit_changed = TRUE; } if (nm->priv->connectivity != connectivity && @@ -312,13 +309,11 @@ got_status (GObject *source, { nm->priv->connectivity = connectivity; g_object_notify (G_OBJECT (nm), "connectivity"); - should_emit_changed = TRUE; } g_object_thaw_notify (G_OBJECT (nm)); - if (should_emit_changed) - g_signal_emit_by_name (nm, "network-changed", available); + g_signal_emit_by_name (nm, "network-changed", available); } static void From d62f7cb67c7eb591d32cf9b85399266223596a53 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 2 Sep 2018 20:35:26 +0200 Subject: [PATCH 5/5] meson: fix typo --- meson.build | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index 5812b21e9..4f99a2cfe 100644 --- a/meson.build +++ b/meson.build @@ -1950,17 +1950,17 @@ subdir('tests') # Install glib-gettextize executable, if a UNIX-style shell is found if have_sh # These should not contain " quotes around the values - gettexize_conf = configuration_data() - gettexize_conf.set('PACKAGE', 'glib') - gettexize_conf.set('VERSION', meson.project_version()) - gettexize_conf.set('prefix', glib_prefix) - gettexize_conf.set('datarootdir', glib_datadir) - gettexize_conf.set('datadir', glib_datadir) + gettextize_conf = configuration_data() + gettextize_conf.set('PACKAGE', 'glib') + gettextize_conf.set('VERSION', meson.project_version()) + gettextize_conf.set('prefix', glib_prefix) + gettextize_conf.set('datarootdir', glib_datadir) + gettextize_conf.set('datadir', glib_datadir) configure_file(input : 'glib-gettextize.in', install : true, install_dir : glib_bindir, output : 'glib-gettextize', - configuration : gettexize_conf) + configuration : gettextize_conf) endif if have_m4