--- nfs-ganesha-2.0.0/src/CMakeLists.txt.orig 2014-05-20 13:58:50.685211144 -0400 +++ nfs-ganesha-2.0.0/src/CMakeLists.txt 2014-05-20 14:00:24.825924703 -0400 @@ -125,6 +125,7 @@ if (LINUX) set(PLATFORM "LINUX") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE64_SOURCE") set(OS_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/include/os/linux") find_library(LIBDL dl) # module loader endif(LINUX) --- nfs-ganesha-2.0.0/src/os/linux/subr.c.orig 2014-05-20 14:02:56.340987294 -0400 +++ nfs-ganesha-2.0.0/src/os/linux/subr.c 2014-05-20 14:03:41.196565516 -0400 @@ -34,6 +34,7 @@ #include #include "os/subr.h" +#ifdef NOT_TRUE /* not defined in linux headers so we do it here */ struct linux_dirent { @@ -50,6 +51,7 @@ // offset is (d_reclen - 1)) */ }; +#endif /** * @brief Read system directory entries into the buffer @@ -63,7 +65,7 @@ { int retval = 0; - retval = syscall(SYS_getdents, fd, buf, bcount); + retval = syscall(SYS_getdents64, fd, buf, bcount); if (retval >= 0) *basepp += retval; return retval; @@ -82,7 +84,7 @@ bool to_vfs_dirent(char *buf, int bpos, struct vfs_dirent *vd, off_t base) { - struct linux_dirent *dp = (struct linux_dirent *)(buf + bpos); + struct dirent64 *dp = (struct dirent64 *)(buf + bpos); char type; vd->vd_ino = dp->d_ino; --- nfs-ganesha-2.0.0/src/FSAL/FSAL_GPFS/handle.c.orig 2014-05-20 14:30:03.880250822 -0400 +++ nfs-ganesha-2.0.0/src/FSAL/FSAL_GPFS/handle.c 2014-05-20 14:31:41.470619655 -0400 @@ -438,6 +438,7 @@ return status; } +#ifdef NOT_TRUE /* not defined in linux headers so we do it here */ @@ -455,6 +456,7 @@ // offset is (d_reclen - 1)) */ }; +#endif #define BUF_SIZE 1024 /** @@ -480,7 +482,7 @@ fsal_status_t status; off_t seekloc = 0; int bpos, cnt, nread; - struct linux_dirent *dentry; + struct dirent64 *dentry; char buf[BUF_SIZE]; if (whence != NULL) @@ -502,7 +504,7 @@ } cnt = 0; do { - nread = syscall(SYS_getdents, dirfd, buf, BUF_SIZE); + nread = syscall(SYS_getdents64, dirfd, buf, BUF_SIZE); if (nread < 0) { retval = errno; fsal_error = posix2fsal_error(retval); @@ -511,7 +513,7 @@ if (nread == 0) break; for (bpos = 0; bpos < nread;) { - dentry = (struct linux_dirent *)(buf + bpos); + dentry = (struct dirent64 *)(buf + bpos); if (strcmp(dentry->d_name, ".") == 0 || strcmp(dentry->d_name, "..") == 0) goto skip; /* must skip '.' and '..' */