raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e6af6c7a7bc3d3b08b263724e968c90808ab514f

commit e6af6c7a7bc3d3b08b263724e968c90808ab514f
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Fri Aug 21 12:48:32 2020 +0100

    eina file - fix getdents64 on older glibc's and use raw syscall
---
 src/lib/eina/eina_file.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

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 @@
 #endif
 #include <fcntl.h>
 
+#if defined(__linux__)
+# include <sys/syscall.h>
+#endif
+
 #ifdef HAVE_SYS_RESOURCE_H
 # include <sys/resource.h>
 #endif
@@ -1286,7 +1290,10 @@ typedef struct
    char           d_name[4096];
 } Dirent;
 #elif defined(__linux__)
-# define do_getdents(fd, buf, size) getdents64(fd, buf, size)
+# define do_getdents(fd, buf, size) syscall(SYS_getdents64, fd, buf, size)
+// getdents64 added un glibc 2.30 ... so use raw syscall - will work
+// from some linux 2.4 on... so ... i think that's ok. :)
+//# define do_getdents(fd, buf, size) getdents64(fd, buf, size)
 typedef struct
 {
    ino64_t        d_ino;

-- 


Reply via email to