forked from enlightenment/efl
eina file - fix getdents64 on older glibc's and use raw syscall
This commit is contained in:
parent
31c343b77c
commit
e6af6c7a7b
|
@ -40,6 +40,10 @@
|
||||||
#endif
|
#endif
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
#if defined(__linux__)
|
||||||
|
# include <sys/syscall.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SYS_RESOURCE_H
|
#ifdef HAVE_SYS_RESOURCE_H
|
||||||
# include <sys/resource.h>
|
# include <sys/resource.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -1286,7 +1290,10 @@ typedef struct
|
||||||
char d_name[4096];
|
char d_name[4096];
|
||||||
} Dirent;
|
} Dirent;
|
||||||
#elif defined(__linux__)
|
#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
|
typedef struct
|
||||||
{
|
{
|
||||||
ino64_t d_ino;
|
ino64_t d_ino;
|
||||||
|
|
Loading…
Reference in New Issue