[glick2] fs: add defines for older glibc headers that still miss the defines



commit fefc3a1099ca507532414444547411b6acb35e6b
Author: Stefan Sauer <ensonic users sf net>
Date:   Mon Oct 17 11:46:29 2011 +0200

    fs: add defines for older glibc headers that still miss the defines

 fs.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/fs.c b/fs.c
index f892934..8c24c2f 100644
--- a/fs.c
+++ b/fs.c
@@ -3202,6 +3202,7 @@ sha1_digest_hash (gconstpointer  key)
   return *p;
 }
 
+#if GLIB_CHECK_VERSION(2, 26, 0)
 static void
 session_bus_died (GDBusConnection *connection,
 		  gboolean         remote_peer_vanished,
@@ -3209,6 +3210,7 @@ session_bus_died (GDBusConnection *connection,
 {
   g_main_loop_quit (mainloop);
 }
+#endif
 
 int
 main (int argc, char *argv[])
@@ -3254,6 +3256,7 @@ main (int argc, char *argv[])
 
   if (die_with_session)
     {
+#if GLIB_CHECK_VERSION(2, 26, 0)
       GDBusConnection *connection;
       connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
       if (connection == NULL)
@@ -3264,6 +3267,10 @@ main (int argc, char *argv[])
       g_dbus_connection_set_exit_on_close (connection, FALSE);
       g_signal_connect (connection, "closed",
 			G_CALLBACK (session_bus_died), NULL);
+#else
+      g_printerr ("No GDBus support in glib, but --die-with-session specified\n");
+      return 1;
+#endif
     }
 
   if ((ch = fuse_mount (glick_mountpoint, NULL)) != NULL)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]