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:
parent
b51f995da7
commit
d576df427e
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user