_dbus_lookup_session_address_launchd: don't define if not used
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 14 Jul 2011 17:48:26 +0000 (18:48 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 5 Aug 2011 11:27:16 +0000 (12:27 +0100)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
dbus/dbus-sysdeps-unix.c

index 7a1eb27..bd10183 100644 (file)
@@ -3421,10 +3421,10 @@ _dbus_lookup_launchd_socket (DBusString *socket_path,
 #endif
 }
 
+#ifdef DBUS_ENABLE_LAUNCHD
 static dbus_bool_t
 _dbus_lookup_session_address_launchd (DBusString *address, DBusError  *error)
 {
-#ifdef DBUS_ENABLE_LAUNCHD
   dbus_bool_t valid_socket;
   DBusString socket_path;
 
@@ -3466,12 +3466,8 @@ _dbus_lookup_session_address_launchd (DBusString *address, DBusError  *error)
 
   _dbus_string_free(&socket_path);
   return TRUE;
-#else
-  dbus_set_error(error, DBUS_ERROR_NOT_SUPPORTED,
-                "can't lookup session address from launchd; launchd support not compiled in");
-  return FALSE;
-#endif
 }
+#endif
 
 /**
  * Determines the address of the session bus by querying a