diff --git a/pkg/cn-cbor/Makefile.include b/pkg/cn-cbor/Makefile.include
index bb736000eed3b5c3bb2e36bf578b3f9ac5e2632f..026202fe3415edd6c38bfd9eec6f00cc11589a8f 100644
--- a/pkg/cn-cbor/Makefile.include
+++ b/pkg/cn-cbor/Makefile.include
@@ -1 +1,4 @@
 INCLUDES += -I$(PKGDIRBASE)/cn-cbor/include
+
+#enable context pointer
+CFLAGS += -DUSE_CBOR_CONTEXT
diff --git a/tests/unittests/tests-cn_cbor/tests-cn_cbor.c b/tests/unittests/tests-cn_cbor/tests-cn_cbor.c
index ce00ab8796d88c3a3096f77d332928ad06919db6..0dff8b08ae5e6df6032316593e3356b2e245f487 100644
--- a/tests/unittests/tests-cn_cbor/tests-cn_cbor.c
+++ b/tests/unittests/tests-cn_cbor/tests-cn_cbor.c
@@ -36,6 +36,14 @@ static size_t test, offs;
 static unsigned char ebuf[EBUF_SIZE];
 static cn_cbor_errback errb;
 
+/* Dummy context struct to force fallback to POSIX calloc/free */
+static cn_cbor_context ct =
+{
+    NULL,
+    NULL,
+    NULL,
+};
+
 static void setup_cn_cbor(void)
 {
     test = 0;
@@ -107,7 +115,7 @@ static void test_parse(void)
 
         errb.err = CN_CBOR_NO_ERROR;
 
-        cn_cbor *cbor = cn_cbor_decode(buf, len, &errb);
+        cn_cbor *cbor = cn_cbor_decode(buf, len, &ct, &errb);
         TEST_ASSERT_EQUAL_INT(errb.err, CN_CBOR_NO_ERROR);
         TEST_ASSERT_NOT_NULL(cbor);
 
@@ -143,7 +151,7 @@ static void test_errors(void)
         size_t len = fmt_hex_bytes(buf, tests[offs].hex);
         TEST_ASSERT(len);
 
-        cn_cbor *cbor = cn_cbor_decode(buf, len, &errb);
+        cn_cbor *cbor = cn_cbor_decode(buf, len, &ct, &errb);
         TEST_ASSERT_NULL(cbor);
         TEST_ASSERT_EQUAL_INT(errb.err, tests[offs].err);
         cn_cbor_free(cbor);