about summary refs log tree commit diff homepage
path: root/test
diff options
context:
space:
mode:
authorJulian Büning <julian.buening@rwth-aachen.de>2018-10-28 20:43:48 +0100
committerCristian Cadar <c.cadar@imperial.ac.uk>2019-05-30 09:45:21 +0100
commit07581cb13d272a01adf7624ab84b6252fc7d525c (patch)
tree4e416b052d60f470ef5c07fd99451daf168a4009 /test
parent3629e3ef0fc999ba9c1e0f43db061bdcc875d735 (diff)
downloadklee-07581cb13d272a01adf7624ab84b6252fc7d525c.tar.gz
fix tests for macOS
Diffstat (limited to 'test')
-rw-r--r--test/Feature/FunctionAlias.c5
-rw-r--r--test/Feature/FunctionAliasVarArg.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/test/Feature/FunctionAlias.c b/test/Feature/FunctionAlias.c
index 2fcb5beb..e1d11d8c 100644
--- a/test/Feature/FunctionAlias.c
+++ b/test/Feature/FunctionAlias.c
@@ -65,7 +65,12 @@ int __attribute__ ((noinline)) twoshorts2int(short a, short b) { return a + b +
 int __attribute__ ((noinline)) twointsmul(int a, int b) { return a * b + 5; }
 int __attribute__ ((noinline)) somethingwithtwoints(int a, int b) { return 2 * a + 3 * b; }
 
+#ifdef __APPLE__
+// FIXME: __attribute__((weak_import, alias("minusone"))) does not work on Mac OS X 10.12.6
+short shortminusone(short a) { return minusone(a); }
+#else
 extern short shortminusone(short) __attribute__((alias("minusone")));
+#endif
 
 int main() {
   short a = 2;
diff --git a/test/Feature/FunctionAliasVarArg.c b/test/Feature/FunctionAliasVarArg.c
index 17893772..423c2516 100644
--- a/test/Feature/FunctionAliasVarArg.c
+++ b/test/Feature/FunctionAliasVarArg.c
@@ -6,6 +6,7 @@
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --output-dir=%t.klee-out -function-alias=printf:printf_format_only_with_varargs %t.bc 2>&1 | FileCheck --check-prefix=CHECK-VA-SUCCESS %s
 
+#include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>