1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-03 12:00:59 +00:00

emulator: make buildable on macOS

This commit is contained in:
Karel Bilek 2018-10-26 16:27:37 +07:00 committed by Jan Pochyla
parent b51f995da7
commit d576df427e
2 changed files with 5 additions and 0 deletions

View File

@ -22,6 +22,7 @@
#include <string.h>
#if (!defined __APPLE__) && (!defined HAVE_STRLCPY)
size_t strlcpy(char *dst, const char *src, size_t size) {
size_t ret = strlen(src);
@ -39,3 +40,5 @@ size_t strlcat(char *dst, const char *src, size_t size) {
return n + strlcpy(&dst[n], src, size - n);
}
#endif

View File

@ -22,7 +22,9 @@
#include <stddef.h>
#if (!defined __APPLE__) && (!defined HAVE_STRLCPY)
size_t strlcpy(char *dst, const char *src, size_t size);
size_t strlcat(char *dst, const char *src, size_t size);
#endif
#endif