From 2a780afc57200699bbd66a32ea5278b1ae8f3f43 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Sat, 24 Jan 2015 14:50:30 +0100 Subject: [PATCH] tests: workaround for compiling with older cmocka --- tests/torture.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/torture.h b/tests/torture.h index f5897561..7464c446 100644 --- a/tests/torture.h +++ b/tests/torture.h @@ -40,6 +40,12 @@ #include +#ifndef assert_return_code +/* hack for older versions of cmocka */ +#define assert_return_code(code, errno) \ + assert_true(code >= 0) +#endif /* assert_return_code */ + /* Used by main to communicate with parse_opt. */ struct argument_s { const char *pattern;