Skip to content

Commit cc12fca

Browse files
committed
Fix open_memstream
1 parent ebb600d commit cc12fca

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ tags
4141
*.flc
4242
.*.swp
4343
tinycbor.pc
44+
.depend
4445

4546
# Visual Studio generated files
4647
*.ib_pdb_index

src/open_memstream.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <stdlib.h>
3333
#include <string.h>
3434

35-
#if defined(__unix__) || defined(__APPLE__)
35+
#if defined(__unix__) || defined(__APPLE__) || defined(__NuttX__)
3636
# include <unistd.h>
3737
#endif
3838
#ifdef __APPLE__
@@ -41,6 +41,9 @@ typedef int LenType;
4141
#elif __linux__
4242
typedef ssize_t RetType;
4343
typedef size_t LenType;
44+
#elif __NuttX__
45+
typedef ssize_t RetType;
46+
typedef size_t LenType;
4447
#else
4548
# error "Cannot implement open_memstream!"
4649
#endif

0 commit comments

Comments
 (0)