Try statx syscall
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5210b89fd7
commit
10deba066e
17
file.c
17
file.c
@ -1112,6 +1112,23 @@ stat_without_gvl(const char *path, struct stat *st)
|
|||||||
RUBY_UBF_IO, NULL);
|
RUBY_UBF_IO, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined HAVE_STATX && defined __linux__
|
||||||
|
# ifdef HAVE_SYSCALL_H
|
||||||
|
# include <syscall.h>
|
||||||
|
# elif defined HAVE_SYS_SYSCALL_H
|
||||||
|
# include <sys/syscall.h>
|
||||||
|
# endif
|
||||||
|
# if defined __NR_statx
|
||||||
|
# include <linux/stat.h>
|
||||||
|
static int statx(int dirfd, const char *pathname, int flags,
|
||||||
|
unsigned int mask, struct statx *statxbuf)
|
||||||
|
{
|
||||||
|
return syscall(__NR_statx, dirfd, pathname, flags, mask, statxbuf);
|
||||||
|
}
|
||||||
|
# define HAVE_STATX
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_STATX
|
#ifdef HAVE_STATX
|
||||||
typedef struct no_gvl_statx_data {
|
typedef struct no_gvl_statx_data {
|
||||||
struct statx *stx;
|
struct statx *stx;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user