[libinput][PATCH] test: Move litest_log and litest_vlog outside ifdef LIBUBWIND block

Khem Raj raj.khem at gmail.com
Thu May 21 12:12:15 PDT 2015


litest_log is used in the else block as well, and we get errors like
test/litest.c:240: error: undefined reference to 'litest_log'

Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 test/litest.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/test/litest.c b/test/litest.c
index 5aa2c3a..ec1216e 100644
--- a/test/litest.c
+++ b/test/litest.c
@@ -49,14 +49,6 @@
 #define UDEV_RULES_D "/run/udev/rules.d"
 #define UDEV_RULE_PREFIX "99-litest-"
 
-static int in_debugger = -1;
-static int verbose = 0;
-
-#ifdef HAVE_LIBUNWIND
-#define UNW_LOCAL_ONLY
-#include <libunwind.h>
-#include <dlfcn.h>
-
 /* defined for the litest selftest */
 #ifndef LITEST_DISABLE_BACKTRACE_LOGGING
 #define litest_log(...) fprintf(stderr, __VA_ARGS__)
@@ -66,6 +58,14 @@ static int verbose = 0;
 #define litest_vlog(...) /* __VA_ARGS__ */
 #endif
 
+static int in_debugger = -1;
+static int verbose = 0;
+
+#ifdef HAVE_LIBUNWIND
+#define UNW_LOCAL_ONLY
+#include <libunwind.h>
+#include <dlfcn.h>
+
 static char cwd[PATH_MAX];
 
 static bool
-- 
2.1.4



More information about the wayland-devel mailing list