nuttx-apps/netutils/bare/cbare_porting_for_nuttx.patch
Jiri Vlasak 72f57fc34e netutils: Add BARE
BARE is a simple binary representation for structured application data.

cbare, the BARE implementation ported by this commit, is an I/O agnostic
C implementation of the BARE message encoding.

Signed-off-by: Jiri Vlasak <jvlasak@elektroline.cz>
2026-01-23 11:05:48 -03:00

28 lines
515 B
Diff

diff --git i/src/cbare.c w/src/cbare.c
index 208639f..a3081fb 100644
--- i/src/cbare.c
+++ w/src/cbare.c
@@ -4,7 +4,9 @@
#include "cbare.h"
#include "utf8.h"
+#ifndef UNUSED
#define UNUSED(x) (void)(x)
+#endif
enum {
U8SZ = 1,
diff --git i/test/baretest.c w/test/baretest.c
index 1561f4c..9df740f 100644
--- i/test/baretest.c
+++ w/test/baretest.c
@@ -10,7 +10,9 @@
#include "alloc.h"
#include "die.h"
+#ifndef UNUSED
#define UNUSED(x) (void)(x)
+#endif
#define ARRLEN(a) sizeof(a)/sizeof(a[0])