mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-07 22:25:12 +00:00
fsutils: Add TinyCBOR Library
This commit is contained in:
parent
c2f75330f7
commit
98dde40a88
5 changed files with 138 additions and 0 deletions
31
fsutils/libtinycbor/fix_open_memstream.patch
Normal file
31
fsutils/libtinycbor/fix_open_memstream.patch
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
From a66a373a9417d3f481e9346286d93e33fac8e616 Mon Sep 17 00:00:00 2001
|
||||
From: Lee Lup Yuen <luppy@appkaki.com>
|
||||
Date: Wed, 5 Jan 2022 08:32:38 +0800
|
||||
Subject: [PATCH] Fix open_memstream.c compilation
|
||||
|
||||
diff --git a/tinycbor/open_memstream.c b/tinycbor/open_memstream.c
|
||||
index 3365378..37a0d08 100644
|
||||
--- a/tinycbor/open_memstream.c
|
||||
+++ b/tinycbor/open_memstream.c
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
-#if defined(__unix__) || defined(__APPLE__)
|
||||
+#if defined(__unix__) || defined(__APPLE__) || defined(__NuttX__)
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
@@ -41,6 +41,9 @@ typedef int LenType;
|
||||
#elif __linux__
|
||||
typedef ssize_t RetType;
|
||||
typedef size_t LenType;
|
||||
+#elif __NuttX__
|
||||
+typedef ssize_t RetType;
|
||||
+typedef size_t LenType;
|
||||
#else
|
||||
# error "Cannot implement open_memstream!"
|
||||
#endif
|
||||
--
|
||||
2.34.1
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue