about summary refs log tree commit diff homepage
path: root/runtime
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2020-12-04 13:11:40 +0000
committerMartinNowack <2443641+MartinNowack@users.noreply.github.com>2020-12-04 15:24:26 +0000
commitfba9ea939e333df3db40091c6c9825f4f5485acb (patch)
tree506f69b4d1f531f9db3d46a6e25d05b4063065cf /runtime
parent729825e1c80eb6a21441fa4d55c967549e231e1f (diff)
downloadklee-fba9ea939e333df3db40091c6c9825f4f5485acb.tar.gz
Declare mempcpy on macOS, to silence compiler warnings
Diffstat (limited to 'runtime')
-rw-r--r--runtime/klee-libc/fortify-klibc.c5
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");