1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys/picolibc_syscalls_default: Fix read/write return for picolibc >= 1.8

Picolibc switched to standard posix types for read/write return in
version 1.8.

Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard 2023-03-02 22:54:22 -08:00
parent fb01e6a3fb
commit 698abbaa04

View File

@ -118,7 +118,8 @@ _exit(int n)
{
LOG_INFO("#! exit %i: powering off\n", n);
pm_off();
while(1);
for (;;) {
}
}
/**
@ -304,6 +305,13 @@ int open(const char *name, int flags, int mode)
#endif
}
/*
* Picolibc newer than 1.8 uses standard posix types for read/write
* return values
*/
#if __PICOLIBC_MAJOR__ > 1 || __PICOLIBC_MINOR__ >= 8
#define _READ_WRITE_RETURN_TYPE ssize_t
#endif
/**
* @brief Read bytes from an open file
*