summaryrefslogtreecommitdiffstats
path: root/meta-xfce
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-03-22 11:45:26 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2017-03-31 13:26:01 +0200
commit705a86332c1df1746fedb893b62c28c3cbf8faa5 (patch)
tree83683d3fae2ae5d567a1aa7924080e8385f5d988 /meta-xfce
parent1b22caf4fa4f20c8e31772eef718d76cfada0c3c (diff)
downloadmeta-openembedded-705a86332c1df1746fedb893b62c28c3cbf8faa5.tar.gz
xfce4-mount-plugin: Fix build with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-xfce')
-rw-r--r--meta-xfce/recipes-panel-plugins/mount/xfce4-mount-plugin/0001-check-for-fstab.h-during-configure.patch85
-rw-r--r--meta-xfce/recipes-panel-plugins/mount/xfce4-mount-plugin_0.6.4.bb2
2 files changed, 87 insertions, 0 deletions
diff --git a/meta-xfce/recipes-panel-plugins/mount/xfce4-mount-plugin/0001-check-for-fstab.h-during-configure.patch b/meta-xfce/recipes-panel-plugins/mount/xfce4-mount-plugin/0001-check-for-fstab.h-during-configure.patch
new file mode 100644
index 000000000..dcc2a3719
--- /dev/null
+++ b/meta-xfce/recipes-panel-plugins/mount/xfce4-mount-plugin/0001-check-for-fstab.h-during-configure.patch
@@ -0,0 +1,85 @@
1From 09e325f8296eb9e63dc57ed137f4a9940f164563 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 21 Mar 2017 17:11:46 -0700
4Subject: [PATCH] check for fstab.h during configure
5
6fstab.h is not universally available, checking it during
7configure creates a knob to disable fstab reads in the
8plugin
9
10Makes it compile/build with musl
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 configure.ac | 1 +
15 panel-plugin/devices.c | 22 ++++++++++++++++++----
16 2 files changed, 19 insertions(+), 4 deletions(-)
17
18diff --git a/configure.ac b/configure.ac
19index 34d6f7f..52ecc4a 100644
20--- a/configure.ac
21+++ b/configure.ac
22@@ -67,6 +67,7 @@ AC_CHECK_HEADERS([sys/socket.h])
23 AC_CHECK_HEADERS([sys/time.h])
24 AC_CHECK_HEADERS([unistd.h])
25 AC_CHECK_HEADERS([sys/sockio.h])
26+AC_CHECK_HEADERS([fstab.h])
27 AC_HEADER_SYS_WAIT
28 AC_PROG_GCC_TRADITIONAL
29 AC_TYPE_SIZE_T
30diff --git a/panel-plugin/devices.c b/panel-plugin/devices.c
31index afa954e..345b603 100644
32--- a/panel-plugin/devices.c
33+++ b/panel-plugin/devices.c
34@@ -24,8 +24,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
35 #ifdef HAVE_CONFIG_H
36 #include <config.h>
37 #endif
38-
39+#if HAVE_FSTAB_H
40 #include <fstab.h>
41+#endif
42 #include <glib.h>
43 #include <stdio.h>
44 #include <string.h>
45@@ -370,14 +371,15 @@ out:
46 GPtrArray *
47 disks_new (gboolean include_NFSs, gboolean *showed_fstab_dialog, gint length)
48 {
49- GPtrArray * pdisks; /* to be returned */
50+ GtkWidget *dialog;
51 t_disk * pdisk;
52- struct fstab *pfstab;
53+ GPtrArray * pdisks; /* to be returned */
54 gboolean has_valid_mount_device;
55- GtkWidget *dialog;
56
57 pdisks = g_ptr_array_new();
58+#if HAVE_FSTAB_H
59
60+ struct fstab *pfstab;
61 /* open fstab */
62 if (setfsent()!=1)
63 {
64@@ -422,6 +424,18 @@ disks_new (gboolean include_NFSs, gboolean *showed_fstab_dialog, gint length)
65
66 endfsent(); /* close file */
67
68+#else
69+ if (! (*showed_fstab_dialog) ) {
70+ dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
71+ GTK_MESSAGE_INFO, GTK_BUTTONS_OK,
72+ "Your /etc/fstab could not be read because fstab is not supported. This will severely degrade the plugin's abilities.");
73+ /* gtk_dialog_run (GTK_DIALOG (dialog)); */
74+ g_signal_connect (dialog, "response",
75+ G_CALLBACK (gtk_widget_destroy), dialog);
76+ gtk_widget_show (dialog);
77+ *showed_fstab_dialog = TRUE;
78+ }
79+#endif
80 return pdisks;
81 }
82
83--
842.12.0
85
diff --git a/meta-xfce/recipes-panel-plugins/mount/xfce4-mount-plugin_0.6.4.bb b/meta-xfce/recipes-panel-plugins/mount/xfce4-mount-plugin_0.6.4.bb
index 6dc2c1721..2a646eb86 100644
--- a/meta-xfce/recipes-panel-plugins/mount/xfce4-mount-plugin_0.6.4.bb
+++ b/meta-xfce/recipes-panel-plugins/mount/xfce4-mount-plugin_0.6.4.bb
@@ -6,5 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
6 6
7inherit xfce-panel-plugin 7inherit xfce-panel-plugin
8 8
9SRC_URI += "file://0001-check-for-fstab.h-during-configure.patch \
10 "
9SRC_URI[md5sum] = "f5917e9aa2a06bc6a872cc10d2ee4f6f" 11SRC_URI[md5sum] = "f5917e9aa2a06bc6a872cc10d2ee4f6f"
10SRC_URI[sha256sum] = "541d7af84d7d0b00ae547aa1f438e2fac51ee4195c4d0a17173c4f72accb227d" 12SRC_URI[sha256sum] = "541d7af84d7d0b00ae547aa1f438e2fac51ee4195c4d0a17173c4f72accb227d"