summaryrefslogtreecommitdiff
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:50:15 +0100
commit0a21bf58d2efe647f098ecffc973d7285304d528 (patch)
treede551b91daf2612f4af34d6811e2c4245d1d0c0a
parent5ab9f4a64cf1bdf6f6022c4c4153f1f70df31066 (diff)
eina file - fix getdents64 on older glibc's and use raw syscall
-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 7ea8006f42..db47948ed5 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;