summaryrefslogtreecommitdiff
path: root/tools/dbus-echo.c
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2015-04-28 20:11:27 +0200
committerRalf Habacker <ralf.habacker@freenet.de>2015-05-01 23:10:12 +0200
commit20568ffb1fdcf54f54bc5d8b4928f3e485c5ab25 (patch)
treeb44ca839dbe4f8c962901453af7715912e6bec18 /tools/dbus-echo.c
parent9979b9916f224f17e031363bc88cab038ae01f03 (diff)
downloaddbus-20568ffb1fdcf54f54bc5d8b4928f3e485c5ab25.tar.gz
tools: MSVC compile fixes
unistd.h and sleep() are normally Unix-specific, although mingw also provides them. The Windows C runtime documents _environ as its equivalent of Unix environ. https://bugs.freedesktop.org/show_bug.cgi?id=90089 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'tools/dbus-echo.c')
-rw-r--r--tools/dbus-echo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/dbus-echo.c b/tools/dbus-echo.c
index 689c1b84..0e7de1bd 100644
--- a/tools/dbus-echo.c
+++ b/tools/dbus-echo.c
@@ -26,7 +26,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <dbus/dbus.h>
@@ -231,7 +233,7 @@ dbus_test_tool_black_hole (int argc, char **argv)
if (noread)
{
while (1)
- sleep (3600);
+ _dbus_sleep_milliseconds (3600);
}
noreply = TRUE;