diff options
Diffstat (limited to 'test/unittests/unit_maybe_alloc.c')
-rw-r--r-- | test/unittests/unit_maybe_alloc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unittests/unit_maybe_alloc.c b/test/unittests/unit_maybe_alloc.c index 25b41d46..985e28f7 100644 --- a/test/unittests/unit_maybe_alloc.c +++ b/test/unittests/unit_maybe_alloc.c @@ -4,6 +4,14 @@ #include <assert.h> #include <cmocka.h> +/* Apparently not supported in very old cmocka versions */ +#ifndef assert_ptr_equal +#define assert_ptr_equal(a, b) \ + _assert_int_equal(cast_ptr_to_largest_integral_type(a), \ + cast_ptr_to_largest_integral_type(b), \ + __FILE__, __LINE__) +#endif + extern void mock_assert(const int result, const char* const expression, const char * const file, const int line); #undef assert |