From c33beaa330bc8917249575b285f4a083dfe81922 Mon Sep 17 00:00:00 2001 From: Gleb Popov <6yearold@gmail.com> Date: Fri, 1 Nov 2019 09:40:37 +0400 Subject: Compile fd_64.c file of POSIX runtime correctly on FreeBSD - append "64" suffix to function names. --- runtime/POSIX/FreeBSD.h | 17 +++++++++++++++++ runtime/POSIX/fd_64.c | 1 + 2 files changed, 18 insertions(+) (limited to 'runtime/POSIX') diff --git a/runtime/POSIX/FreeBSD.h b/runtime/POSIX/FreeBSD.h index 58eebee6..d4e1379e 100644 --- a/runtime/POSIX/FreeBSD.h +++ b/runtime/POSIX/FreeBSD.h @@ -13,7 +13,9 @@ // for various typedefs inside FreeBSD headers #define __BSD_VISIBLE 1 +#ifndef INSIDE_FD_64 #define stat64 stat +#endif #include @@ -435,4 +437,19 @@ struct rlimit64; #define __NR_numa_setaffinity SYS_numa_setaffinity #define __NR_MAXSYSCALL SYS_MAXSYSCALL +// we are in fd_64.c, add "64" suffix to its functions +#ifdef INSIDE_FD_64 + +#define open open64 +#define openat openat64 +#define lseek lseek64 +#define __xstat __xstat64 +#define stat stat64 +#define __lxstat __lxstat64 +#define lstat lstat64 +#define __fxstat __fxstat64 +#define fstat fstat64 + +#endif + #endif /* KLEE_FREEBSD_H */ diff --git a/runtime/POSIX/fd_64.c b/runtime/POSIX/fd_64.c index 7691538f..eec41f11 100644 --- a/runtime/POSIX/fd_64.c +++ b/runtime/POSIX/fd_64.c @@ -15,6 +15,7 @@ #endif #endif +#define INSIDE_FD_64 #define _LARGEFILE64_SOURCE #define _FILE_OFFSET_BITS 64 #include "fd.h" -- cgit 1.4.1