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

Khem Raj raj.khem at gmail.com
Fri May 22 09:59:05 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 | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/test/litest.c b/test/litest.c
index e1db754..ad9bcd4 100644
--- a/test/litest.c
+++ b/test/litest.c
@@ -50,6 +50,15 @@
 #define UDEV_RULES_D "/run/udev/rules.d"
 #define UDEV_RULE_PREFIX "99-litest-"
 
+/* defined for the litest selftest */
+#ifndef LITEST_DISABLE_BACKTRACE_LOGGING
+#define litest_log(...) fprintf(stderr, __VA_ARGS__)
+#define litest_vlog(format_, args_) vfprintf(stderr, format_, args_)
+#else
+#define litest_log(...) /* __VA_ARGS__ */
+#define litest_vlog(...) /* __VA_ARGS__ */
+#endif
+
 static int in_debugger = -1;
 static int verbose = 0;
 const char *filter_test = NULL;
@@ -61,15 +70,6 @@ const char *filter_group = NULL;
 #include <libunwind.h>
 #include <dlfcn.h>
 
-/* defined for the litest selftest */
-#ifndef LITEST_DISABLE_BACKTRACE_LOGGING
-#define litest_log(...) fprintf(stderr, __VA_ARGS__)
-#define litest_vlog(format_, args_) vfprintf(stderr, format_, args_)
-#else
-#define litest_log(...) /* __VA_ARGS__ */
-#define litest_vlog(...) /* __VA_ARGS__ */
-#endif
-
 static char cwd[PATH_MAX];
 
 static bool
-- 
2.1.4



More information about the wayland-devel mailing list