subsys/ipc icmsg_me.c: Fix ssize_t build error for some libCs
ssize_t is not part of the C library ISO standard subset, and as such one cannot expect a C library to expose the type by default. Some libraries like glibc do not expose this type in general, and trying to build using them results in build errors. There is 3 possible options: 1. Continue using ssize_t and: 1.a define _POSIX_C_SOURCE before including any header 1.b include sys/types.h directly (A bit uglier) 3. Not use ssize_t, and instead rely on ISO standard types Let's just go with 1.a assuming we want to keep using this type, as that is the correct way of getting this type defined. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
00b6443a55
commit
b6f1767db5
1 changed files with 3 additions and 0 deletions
|
|
@ -4,6 +4,9 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#undef _POSIX_C_SOURCE
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#include <zephyr/ipc/icmsg_me.h>
|
||||
#include <zephyr/sys/math_extras.h>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue