summaryrefslogtreecommitdiff
path: root/src/lib/eina/eina_file.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-08-21 12:48:32 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-08-21 12:48:32 +0100
commite6af6c7a7bc3d3b08b263724e968c90808ab514f (patch)
tree86b84eb558946948a7a7fb5bc50b8d6458ca1f23 /src/lib/eina/eina_file.c
parent31c343b77c7967f1c6c7eba4c8dca06c2df5ed89 (diff)
eina file - fix getdents64 on older glibc's and use raw syscall
Diffstat (limited to '')
-rw-r--r--src/lib/eina/eina_file.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/eina/eina_file.c b/src/lib/eina/eina_file.c
index c5e1f1a0b8..e88cd9c73c 100644
--- a/src/lib/eina/eina_file.c
+++ b/src/lib/eina/eina_file.c
@@ -40,6 +40,10 @@
40#endif 40#endif
41#include <fcntl.h> 41#include <fcntl.h>
42 42
43#if defined(__linux__)
44# include <sys/syscall.h>
45#endif
46
43#ifdef HAVE_SYS_RESOURCE_H 47#ifdef HAVE_SYS_RESOURCE_H
44# include <sys/resource.h> 48# include <sys/resource.h>
45#endif 49#endif
@@ -1286,7 +1290,10 @@ typedef struct
1286 char d_name[4096]; 1290 char d_name[4096];
1287} Dirent; 1291} Dirent;
1288#elif defined(__linux__) 1292#elif defined(__linux__)
1289# define do_getdents(fd, buf, size) getdents64(fd, buf, size) 1293# define do_getdents(fd, buf, size) syscall(SYS_getdents64, fd, buf, size)
1294// getdents64 added un glibc 2.30 ... so use raw syscall - will work
1295// from some linux 2.4 on... so ... i think that's ok. :)
1296//# define do_getdents(fd, buf, size) getdents64(fd, buf, size)
1290typedef struct 1297typedef struct
1291{ 1298{
1292 ino64_t d_ino; 1299 ino64_t d_ino;