about summary refs log tree commit diff homepage
path: root/runtime
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2021-12-23 22:39:54 +0000
committerMartinNowack <2443641+MartinNowack@users.noreply.github.com>2021-12-24 10:19:19 +0000
commitcbd82eaa692cb2ae503ab842f5997ad3e40ded9b (patch)
treecfe773c05d949d224ea2185f32b4073947993770 /runtime
parent799ab806509407f72249e6ef49fc44b185a3e81d (diff)
downloadklee-cbd82eaa692cb2ae503ab842f5997ad3e40ded9b.tar.gz
Added correct signature for swapoff on FreeBSD (to solve recent CI failures)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/POSIX/stubs.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/runtime/POSIX/stubs.c b/runtime/POSIX/stubs.c
index 168bf299..5d27ac43 100644
--- a/runtime/POSIX/stubs.c
+++ b/runtime/POSIX/stubs.c
@@ -421,17 +421,24 @@ int umount2(const char *target, int flags) {
 int swapon(const char *path, int swapflags) __attribute__((weak));
 int swapon(const char *path, int swapflags) {
 #else
-int swapon(const char *path)__attribute__((weak));
-int swapon(const char *path)
-{
+int swapon(const char *path) __attribute__((weak));
+int swapon(const char *path) {
 #endif
   klee_warning("ignoring (EPERM)");
   errno = EPERM;
   return -1;
 }
 
+#ifndef __FreeBSD__
+int swapoff(const char *path) __attribute__((weak));
+int swapoff(const char *path) {
+#elif __FreeBSD__ < 13
 int swapoff(const char *path) __attribute__((weak));
 int swapoff(const char *path) {
+#else
+int swapoff(const char *path, u_int swapflags) __attribute__((weak));
+int swapoff(const char *path, u_int swapflags) {
+#endif
   klee_warning("ignoring (EPERM)");
   errno = EPERM;
   return -1;