From af1777d3d3d77682ccb218eec7efb46a1d0776e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 19 Jan 2022 15:49:44 +0400 Subject: [PATCH] meson: compile GUnixCredentialsMessage on all platforms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The header is now also installed under the common GIO include directory. Sorry if it breaks any build, you had to use the correct header path. Signed-off-by: Marc-André Lureau Signed-off-by: Marc-André Lureau --- docs/reference/gio/meson.build | 1 - gio/gunixcredentialsmessage.c | 10 ++++++++++ gio/meson.build | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/reference/gio/meson.build b/docs/reference/gio/meson.build index 34a361bdf..dba062055 100644 --- a/docs/reference/gio/meson.build +++ b/docs/reference/gio/meson.build @@ -109,7 +109,6 @@ if get_option('gtk_doc') ignore_headers += [ 'gfiledescriptorbased.h', 'gunixconnection.h', - 'gunixcredentialsmessage.h', 'gunixmounts.h', 'gunixfdlist.h', 'gunixfdmessage.h', diff --git a/gio/gunixcredentialsmessage.c b/gio/gunixcredentialsmessage.c index 9e5c7d32e..e8ac5a73c 100644 --- a/gio/gunixcredentialsmessage.c +++ b/gio/gunixcredentialsmessage.c @@ -31,6 +31,14 @@ * g_unix_connection_receive_credentials(). To receive credentials of * a foreign process connected to a socket, use * g_socket_get_credentials(). + * + * Since GLib 2.72, #GUnixCredentialMessage is available on all platforms. It + * requires underlying system support (such as Windows 10 with `AF_UNIX`) at run + * time. + * + * Before GLib 2.72, `` belonged to the UNIX-specific + * GIO interfaces, thus you had to use the `gio-unix-2.0.pc` pkg-config file + * when using it. This is no longer necessary since GLib 2.72. */ #include "config.h" @@ -40,7 +48,9 @@ #include #include #include +#ifdef HAVE_UNISTD_H #include +#endif #include "gunixcredentialsmessage.h" #include "gcredentials.h" diff --git a/gio/meson.build b/gio/meson.build index 1ba9ce356..9e7539edd 100644 --- a/gio/meson.build +++ b/gio/meson.build @@ -347,7 +347,6 @@ if host_system != 'windows' 'gfiledescriptorbased.c', 'giounix-private.c', 'gunixconnection.c', - 'gunixcredentialsmessage.c', 'gunixfdlist.c', 'gunixfdmessage.c', 'gunixmount.c', @@ -376,7 +375,6 @@ if host_system != 'windows' gio_unix_include_headers = files( 'gfiledescriptorbased.h', 'gunixconnection.h', - 'gunixcredentialsmessage.h', 'gunixmounts.h', 'gunixfdlist.h', 'gunixfdmessage.h', @@ -567,6 +565,7 @@ gio_sources = files( 'gdtlsclientconnection.c', 'gdtlsserverconnection.c', 'gunionvolumemonitor.c', + 'gunixcredentialsmessage.c', 'gunixsocketaddress.c', 'gvfs.c', 'gvolume.c', @@ -703,6 +702,7 @@ gio_headers = files( 'gdtlsconnection.h', 'gdtlsclientconnection.h', 'gdtlsserverconnection.h', + 'gunixcredentialsmessage.h', 'gunixsocketaddress.h', 'gvfs.h', 'gvolume.h',