zephyr: rtos: Allow memory operations to be called from cpp code

The memcpy_s() function is called from CPP code in IADK modules.
Declare it as extern "C" when header included in CPP code.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
This commit is contained in:
Jaroslaw Stelter 2022-09-05 14:39:25 +02:00 committed by Liam Girdwood
parent dde3db52c3
commit a363e882ea
1 changed files with 7 additions and 0 deletions

View File

@ -11,6 +11,9 @@
#include <stddef.h> #include <stddef.h>
#include <errno.h> #include <errno.h>
#ifdef __cplusplus
extern "C" {
#endif
/* missing from zephyr - TODO: convert to memset() */ /* missing from zephyr - TODO: convert to memset() */
#define bzero(ptr, size) \ #define bzero(ptr, size) \
memset(ptr, 0, size) memset(ptr, 0, size)
@ -60,4 +63,8 @@ static inline int memset_s(void *dest, size_t dest_size, int data, size_t count)
return 0; return 0;
} }
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* __ZEPHYR_RTOS_STRING_H__ */ #endif /* __ZEPHYR_RTOS_STRING_H__ */