diff options
author | Gleb Popov <6yearold@gmail.com> | 2019-11-01 09:40:37 +0400 |
---|---|---|
committer | MartinNowack <martin.nowack@gmail.com> | 2019-11-09 15:31:56 +0000 |
commit | c33beaa330bc8917249575b285f4a083dfe81922 (patch) | |
tree | 9a92d586f554af47bf281757b837f17d65837bd3 | |
parent | a5dafcf58bcbc5f3387169a8ea287fa57c0b0e32 (diff) | |
download | klee-c33beaa330bc8917249575b285f4a083dfe81922.tar.gz |
Compile fd_64.c file of POSIX runtime correctly on FreeBSD - append "64" suffix
to function names.
-rw-r--r-- | runtime/POSIX/FreeBSD.h | 17 | ||||
-rw-r--r-- | runtime/POSIX/fd_64.c | 1 |
2 files changed, 18 insertions, 0 deletions
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 <sys/syscall.h> @@ -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" |