aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2015-01-24 14:50:30 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2015-02-12 11:39:45 +0100
commitddc3f987a74ee219c108ffa47921fd53ba18ab70 (patch)
tree7c26dd68c27869c8564a5ea801c4511a3f73fa52
parente9ad0c3c69fb8bc5143e74c5d7e69be8404ffe8d (diff)
downloadlibssh-ddc3f987a74ee219c108ffa47921fd53ba18ab70.tar.gz
libssh-ddc3f987a74ee219c108ffa47921fd53ba18ab70.tar.xz
libssh-ddc3f987a74ee219c108ffa47921fd53ba18ab70.zip
tests: workaround for compiling with older cmocka
-rw-r--r--tests/torture.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/torture.h b/tests/torture.h
index 75713061..ac915714 100644
--- a/tests/torture.h
+++ b/tests/torture.h
@@ -39,6 +39,12 @@
#include <cmocka.h>
+#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 {
char *args[2];