summaryrefslogtreecommitdiff
path: root/tests/testdisplay_hotplug.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-01-24 11:28:25 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-01-24 11:28:25 +0100
commitfa461203e6df7318d49d183366769e392e6decf0 (patch)
treeb1aa2bf0f3b0333e3b1e398ef1b896d0914020a5 /tests/testdisplay_hotplug.c
parent7f7cafe7293570d56607b101cac7db617741713d (diff)
testdisplay: make udev optional
Hopefully this makes Solaris happy. Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/testdisplay_hotplug.c')
-rw-r--r--tests/testdisplay_hotplug.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/testdisplay_hotplug.c b/tests/testdisplay_hotplug.c
index 504e7b08..3f80dc73 100644
--- a/tests/testdisplay_hotplug.c
+++ b/tests/testdisplay_hotplug.c
@@ -24,10 +24,14 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include <libudev.h>
#include "testdisplay.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#if HAVE_UDEV
+#include <libudev.h>
static struct udev_monitor *uevent_monitor;
static struct udev *udev;
static GIOChannel *udevchannel;
@@ -119,3 +123,14 @@ void testdisplay_cleanup_hotplug(void)
if (udev)
udev_unref(udev);
}
+#else
+gboolean testdisplay_setup_hotplug(void)
+{
+ fprintf(stderr, "no hotplug support on this platform\n");
+ return TRUE;
+}
+
+void testdisplay_cleanup_hotplug(void)
+{
+}
+#endif