From cbd82eaa692cb2ae503ab842f5997ad3e40ded9b Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Thu, 23 Dec 2021 22:39:54 +0000 Subject: Added correct signature for swapoff on FreeBSD (to solve recent CI failures) --- runtime/POSIX/stubs.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'runtime') 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; -- cgit 1.4.1