Skip to content

Commit b072695

Browse files
nmaggionixiaoxiang781216
authored andcommitted
fsutils/libtinycbor: Update TinyCBOR to 0.6.1
Update the TinyCBOR serialization library to the latest 0.6.1 tagged release. Signed-off-by: Niccolò Maggioni <[email protected]>
1 parent 056f04d commit b072695

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

fsutils/libtinycbor/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
include $(APPDIR)/Make.defs
2424

2525
TINYCBOR_URL ?= "https://github.com/intel/tinycbor/archive"
26-
TINYCBOR_VERSION ?= 3cba6b11aaa0f6f674cd56ebaa573c4b65f71ee7
26+
TINYCBOR_VERSION ?= c0aad2fb2137a31b9845fbaae3653540c410f215
2727

2828
TINYCBOR_UNPACKNAME = tinycbor
2929

@@ -51,6 +51,7 @@ CSRCS += tinycbor/cborvalidation.c
5151
CSRCS += tinycbor/open_memstream.c
5252

5353
CFLAGS += -std=c99
54+
CFLAGS += -DCBOR_NO_HALF_FLOAT_TYPE
5455

5556
clean::
5657
$(call DELFILE, $(OBJS))
Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
1-
From a66a373a9417d3f481e9346286d93e33fac8e616 Mon Sep 17 00:00:00 2001
2-
From: Lee Lup Yuen <[email protected]>
3-
Date: Wed, 5 Jan 2022 08:32:38 +0800
4-
Subject: [PATCH] Fix open_memstream.c compilation
5-
61
diff --git a/tinycbor/open_memstream.c b/tinycbor/open_memstream.c
72
index 3365378..37a0d08 100644
83
--- a/tinycbor/open_memstream.c
94
+++ b/tinycbor/open_memstream.c
10-
@@ -32,7 +32,7 @@
5+
@@ -32,13 +32,13 @@
116
#include <stdlib.h>
127
#include <string.h>
13-
8+
149
-#if defined(__unix__) || defined(__APPLE__)
1510
+#if defined(__unix__) || defined(__APPLE__) || defined(__NuttX__)
1611
# include <unistd.h>
1712
#endif
18-
#ifdef __APPLE__
19-
@@ -41,6 +41,9 @@ typedef int LenType;
20-
#elif __linux__
13+
-#ifdef __APPLE__
14+
+#if defined(__APPLE__)
15+
typedef int RetType;
16+
typedef int LenType;
17+
-#elif __linux__
18+
+#elif defined(__linux__) || defined(__NuttX__)
2119
typedef ssize_t RetType;
2220
typedef size_t LenType;
23-
+#elif __NuttX__
24-
+typedef ssize_t RetType;
25-
+typedef size_t LenType;
2621
#else
27-
# error "Cannot implement open_memstream!"
28-
#endif
29-
--
30-
2.34.1
22+
@@ -99,9 +99,9 @@ FILE *open_memstream(char **bufptr, size_t *lenptr)
23+
*bufptr = NULL;
24+
*lenptr = 0;
3125

26+
-#ifdef __APPLE__
27+
+#if defined(__APPLE__)
28+
return funopen(b, NULL, write_to_buffer, NULL, close_buffer);
29+
-#elif __linux__
30+
+#elif defined(__linux__) || defined(__NuttX__)
31+
static const cookie_io_functions_t vtable = {
32+
NULL,
33+
write_to_buffer,

0 commit comments

Comments
 (0)