From 03458088f3bd314d4ac31daa7b8e1b3554e8b736 Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Thu, 26 Sep 2013 17:35:36 +0800 Subject: [PATCH] Fix build on NetBSD 6.1.1 with gcc 4.5.3 There are two build failure on NetBSD 6.1.1 with gcc 4.5.3, the first one is char to int, warning treat as error. The second one is dismatch value prototype with format string. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69842 --- tools/dbus-launch.c | 2 +- tools/dbus-monitor.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/dbus-launch.c b/tools/dbus-launch.c index 14fa226..b071fcc 100644 --- a/tools/dbus-launch.c +++ b/tools/dbus-launch.c @@ -132,7 +132,7 @@ read_machine_uuid_if_needed (void) goto out; /* rstrip the read uuid */ - while (len > 31 && isspace(uuid[len - 1])) + while (len > 31 && isspace((int) uuid[len - 1])) len--; if (len != 32) diff --git a/tools/dbus-monitor.c b/tools/dbus-monitor.c index 7382f4b..cf17f64 100644 --- a/tools/dbus-monitor.c +++ b/tools/dbus-monitor.c @@ -106,6 +106,9 @@ monitor_filter_func (DBusConnection *connection, #ifdef __APPLE__ #define PROFILE_TIMED_FORMAT "%s\t%lu\t%d" +#elif defined(__NetBSD__) +#include +#define PROFILE_TIMED_FORMAT "%s\t%" PRId64 "\t%d" #else #define PROFILE_TIMED_FORMAT "%s\t%lu\t%lu" #endif -- 1.7.9.5