1.0.0.16: fix SB-POSIX:READDIR to work when built with largefile
[sbcl.git] / src / runtime / largefile.c
index bd4cbc1..a75339f 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <sys/mman.h>
 #include <sys/types.h>
+#include <dirent.h>
 #include <unistd.h>
 #include <sys/stat.h>
 
@@ -42,7 +43,7 @@ ftruncate_largefile(int fd, off_t length) {
 
 void*
 mmap_largefile(void *start, size_t length, int prot, int flags, int fd, off_t offset) {
-    mmap(start, length, prot, flags, fd, offset);
+    return mmap(start, length, prot, flags, fd, offset);
 }
 
 int
@@ -60,4 +61,9 @@ lstat_largefile(const char *file_name, struct stat *buf) {
     return lstat(file_name, buf);
 }
 
+struct dirent64 *
+readdir_largefile(DIR *dir) {
+    return readdir(dir);
+}
+
 #endif