summaryrefslogtreecommitdiff
path: root/tools/dbus-monitor.c
diff options
context:
space:
mode:
authorChengwei Yang <chengwei.yang@intel.com>2013-09-26 17:35:36 +0800
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-10-08 10:29:20 +0100
commitfd5271f83996956ee326441f450ffd5e5e8e91d0 (patch)
treed06ac72455f09aadeb2028faf499f2af95b7ccf1 /tools/dbus-monitor.c
parentd56ca38ef68fc0271a844c75559370d61f4c97b6 (diff)
downloaddbus-fd5271f83996956ee326441f450ffd5e5e8e91d0.tar.gz
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 treated as error. The second one is a mismatch between format string and arguments. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69842 [adjusted commit message -smcv] Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'tools/dbus-monitor.c')
-rw-r--r--tools/dbus-monitor.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/dbus-monitor.c b/tools/dbus-monitor.c
index 7382f4bf..cf17f642 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 <inttypes.h>
+#define PROFILE_TIMED_FORMAT "%s\t%" PRId64 "\t%d"
#else
#define PROFILE_TIMED_FORMAT "%s\t%lu\t%lu"
#endif