From e5e14909904abde7455426b2da6b7728ce95ddb1 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 4 Oct 2019 12:55:14 -0700 Subject: [PATCH 1/2] gunixmounts: Handle Solaris name of mnt_mntopts in place of mnt_opts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes build failure: ../gio/gunixmounts.c: In function ‘_g_get_unix_mounts’: ../gio/gunixmounts.c:742:53: error: ‘struct mnttab’ has no member named ‘mnt_opts’; did you mean ‘mnt_mntopts’? 742 | mntent.mnt_opts, | ^~~~~~~~ | mnt_mntopts Signed-off-by: Alan Coopersmith --- gio/gunixmounts.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c index cf73fe5e0..1e45a5b13 100644 --- a/gio/gunixmounts.c +++ b/gio/gunixmounts.c @@ -165,6 +165,9 @@ static guint64 mount_poller_time = 0; #endif #elif defined (HAVE_SYS_MNTTAB_H) #include +#ifdef _sun +#define mnt_opts mnt_mntopts +#endif #endif #ifdef HAVE_SYS_VFSTAB_H From 2b34f52b019a001fbe8aea743e95f7a86751fcc9 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 4 Oct 2019 13:23:25 -0700 Subject: [PATCH 2/2] build: no --export-dynamic ldflags for Solaris Signed-off-by: Alan Coopersmith --- gio/gunixmounts.c | 2 +- meson.build | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c index 1e45a5b13..cbf2ee99e 100644 --- a/gio/gunixmounts.c +++ b/gio/gunixmounts.c @@ -165,7 +165,7 @@ static guint64 mount_poller_time = 0; #endif #elif defined (HAVE_SYS_MNTTAB_H) #include -#ifdef _sun +#if defined(__sun) && !defined(mnt_opts) #define mnt_opts mnt_mntopts #endif #endif diff --git a/meson.build b/meson.build index cc49b8a48..0177c6ba7 100644 --- a/meson.build +++ b/meson.build @@ -2027,6 +2027,8 @@ elif host_system == 'cygwin' export_dynamic_ldflags = ['-Wl,--export-all-symbols'] elif host_system == 'darwin' export_dynamic_ldflags = [] +elif host_system == 'sunos' + export_dynamic_ldflags = [] else export_dynamic_ldflags = ['-Wl,--export-dynamic'] endif