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:
parent
fb01e6a3fb
commit
698abbaa04
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user