Fix Werror=unused-function if build without X11
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 13 Jun 2013 15:18:30 +0000 (16:18 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 13 Jun 2013 15:18:30 +0000 (16:18 +0100)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65712
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
tools/dbus-launch.c

index b2ffe41..632a004 100644 (file)
@@ -105,6 +105,7 @@ save_machine_uuid (const char *uuid_arg)
   machine_uuid = xstrdup (uuid_arg);
 }
 
+#ifdef DBUS_BUILD_X11
 #define UUID_MAXLEN 40
 /* Read the machine uuid from file if needed. Returns TRUE if machine_uuid is
  * set after this function */
@@ -146,7 +147,7 @@ out:
   fclose(f);
   return ret;
 }
-
+#endif /* DBUS_BUILD_X11 */
 
 void
 verbose (const char *format,