Create bacnet strnlen and stricmp to avoid libc compiler problems

This commit is contained in:
Steve Karg
2024-07-22 16:22:36 -05:00
parent 3864421ac8
commit 766e0c020d
4 changed files with 49 additions and 38 deletions
-11
View File
@@ -77,17 +77,6 @@ __inline int c99_snprintf(char *outBuf, size_t size, const char *format, ...)
return count;
}
#endif
#elif defined(__ZEPHYR__)
#include <strings.h>
/* For some reason my Zephyr build for non-native targets does not
* see a definition for strnlen(), but it is visible in when
* compiling for native_posix. This results in the compiler
* emitting a warning, forcing Zephyr's sanitycheck() script to stop.
* Until this is chased down, the definition is being provided here.
*/
#if !CONFIG_NATIVE_APPLICATION
size_t strnlen(const char *, size_t);
#endif
#endif
/* some common min/max as defined in windef.h */