diff --git a/strlcpy.c b/strlcpy.c index 33cc421..d25cec5 100644 --- a/strlcpy.c +++ b/strlcpy.c @@ -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 diff --git a/strlcpy.h b/strlcpy.h index fe08ff8..e283928 100644 --- a/strlcpy.h +++ b/strlcpy.h @@ -46,6 +46,8 @@ extern "C" { #ifndef STRLCPY_DEFINED size_t EXPRT strlcpy(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 #ifdef __cplusplus