about summary refs log tree commit diff homepage
path: root/runtime/POSIX
diff options
context:
space:
mode:
authorGleb Popov <6yearold@gmail.com>2019-05-05 21:07:50 +0400
committerCristian Cadar <c.cadar@imperial.ac.uk>2019-05-06 10:51:27 +0100
commit0f96bfe68b22096b66b422cdfe402af724df7b50 (patch)
treeb970d0612ca717d7629e979cd3f4a1fa82041db7 /runtime/POSIX
parent0edd1ec26d22bc353e817488d43f493409b3e60d (diff)
downloadklee-0f96bfe68b22096b66b422cdfe402af724df7b50.tar.gz
Fix compilation of POSIX runtime on FreeBSD 11.
Diffstat (limited to 'runtime/POSIX')
-rw-r--r--runtime/POSIX/fd_32.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/POSIX/fd_32.c b/runtime/POSIX/fd_32.c
index 3656971b..434acc9e 100644
--- a/runtime/POSIX/fd_32.c
+++ b/runtime/POSIX/fd_32.c
@@ -170,7 +170,11 @@ int statfs(const char *path, struct statfs *buf32) {
 #ifndef __FreeBSD__
 ssize_t getdents(int fd, struct dirent *dirp, size_t nbytes) {
 #else
+#if __FreeBSD__ > 11
 ssize_t getdents(int fd, char *dirp, size_t nbytes) {
+#else
+int getdents(int fd, char *dirp, int nbytes) {
+#endif
 #endif
   struct dirent64 *dp64 = (struct dirent64*) dirp;
   ssize_t res = __fd_getdents(fd, dp64, nbytes);