diff options
author | Cristian Cadar <c.cadar@imperial.ac.uk> | 2020-12-04 13:11:40 +0000 |
---|---|---|
committer | MartinNowack <2443641+MartinNowack@users.noreply.github.com> | 2020-12-04 15:24:26 +0000 |
commit | fba9ea939e333df3db40091c6c9825f4f5485acb (patch) | |
tree | 506f69b4d1f531f9db3d46a6e25d05b4063065cf /runtime/klee-libc | |
parent | 729825e1c80eb6a21441fa4d55c967549e231e1f (diff) | |
download | klee-fba9ea939e333df3db40091c6c9825f4f5485acb.tar.gz |
Declare mempcpy on macOS, to silence compiler warnings
Diffstat (limited to 'runtime/klee-libc')
-rw-r--r-- | runtime/klee-libc/fortify-klibc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/klee-libc/fortify-klibc.c b/runtime/klee-libc/fortify-klibc.c index ed4a3033..12f80345 100644 --- a/runtime/klee-libc/fortify-klibc.c +++ b/runtime/klee-libc/fortify-klibc.c @@ -13,6 +13,11 @@ #include <string.h> +#ifdef __APPLE__ +/* macOS does not provide mempcpy in string.h */ +void *mempcpy(void *destaddr, void const *srcaddr, size_t len); +#endif + void *__mempcpy_chk(void *dest, const void *src, size_t len, size_t destlen) { if (len > destlen) klee_report_error(__FILE__, __LINE__, "mempcpy overflow", "ptr.err"); |