Create dummy routine to fix linker errors on empty library

This commit is contained in:
Stefan Ritt 2019-05-29 10:42:32 +02:00
parent cb34fe499c
commit 5f9886be00
2 changed files with 7 additions and 0 deletions

View File

@ -98,4 +98,9 @@ size_t strlcat(char *dst, const char *src, size_t size)
/*-------------------------------------------------------------------*/ /*-------------------------------------------------------------------*/
#else
size_t strlcpy_dummy(void) // dummy to avoid linker warnings
{
return 0;
}
#endif // STRLCPY_DEFINED #endif // STRLCPY_DEFINED

View File

@ -46,6 +46,8 @@ extern "C" {
#ifndef STRLCPY_DEFINED #ifndef STRLCPY_DEFINED
size_t EXPRT strlcpy(char *dst, const char *src, size_t size); size_t EXPRT strlcpy(char *dst, const char *src, size_t size);
size_t EXPRT strlcat(char *dst, const char *src, size_t size); size_t EXPRT strlcat(char *dst, const char *src, size_t size);
#else
size_t EXPRT strlcpy_dummy(void);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus