about summary refs log tree commit diff homepage
path: root/runtime/POSIX/FreeBSD.h
diff options
context:
space:
mode:
authorGleb Popov <6yearold@gmail.com>2019-04-14 22:36:20 +0400
committerCristian Cadar <c.cadar@imperial.ac.uk>2019-04-29 19:18:43 +0100
commit5f8541ea1bb007af182cdda6080e3e46fce8e271 (patch)
treee8c602c14d2fb4f8c0757f0c0ff4a1d8d0ff7911 /runtime/POSIX/FreeBSD.h
parente5743af37903c32cc24180f80fe49072dbda88f6 (diff)
downloadklee-5f8541ea1bb007af182cdda6080e3e46fce8e271.tar.gz
More FreeBSD related fixes to POSIX runtime.
Diffstat (limited to 'runtime/POSIX/FreeBSD.h')
-rw-r--r--runtime/POSIX/FreeBSD.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/runtime/POSIX/FreeBSD.h b/runtime/POSIX/FreeBSD.h
index 9ba79ae7..fb3f99bd 100644
--- a/runtime/POSIX/FreeBSD.h
+++ b/runtime/POSIX/FreeBSD.h
@@ -15,6 +15,8 @@
 
 #define stat64 stat
 
+#include <sys/syscall.h>
+
 struct rlimit64;
 
 #define	__NR_syscall	SYS_syscall
@@ -134,9 +136,17 @@ struct rlimit64;
 #define	__NR_setgid	SYS_setgid
 #define	__NR_setegid	SYS_setegid
 #define	__NR_seteuid	SYS_seteuid
+#ifdef SYS_stat
 #define	__NR_stat	SYS_stat
+#else
+#define	__NR_stat	SYS_freebsd11_stat
+#endif
 #define	__NR_fstat	SYS_fstat
+#ifdef SYS_lstat
 #define	__NR_lstat	SYS_lstat
+#else
+#define	__NR_lstat	SYS_freebsd11_lstat
+#endif
 #define	__NR_pathconf	SYS_pathconf
 #define	__NR_fpathconf	SYS_fpathconf
 #define	__NR_getrlimit	SYS_getrlimit
@@ -183,8 +193,13 @@ struct rlimit64;
 #define	__NR_aio_read	SYS_aio_read
 #define	__NR_aio_write	SYS_aio_write
 #define	__NR_lio_listio	SYS_lio_listio
+#ifdef SYS_getdents
 #define	__NR_getdents	SYS_getdents
 #define	__NR_getdents64	SYS_getdents
+#else
+#define	__NR_getdents	SYS_freebsd11_getdents
+#define	__NR_getdents64	SYS_freebsd11_getdents
+#endif
 #define	__NR_lchmod	SYS_lchmod
 #define	__NR_netbsd_lchown	SYS_netbsd_lchown
 #define	__NR_lutimes	SYS_lutimes