… | |
… | |
9 | #include <sys/types.h> |
9 | #include <sys/types.h> |
10 | #include <sys/stat.h> |
10 | #include <sys/stat.h> |
11 | #include <limits.h> |
11 | #include <limits.h> |
12 | #include <fcntl.h> |
12 | #include <fcntl.h> |
13 | #include <sched.h> |
13 | #include <sched.h> |
14 | #include <dirent.h> |
|
|
15 | |
14 | |
16 | #ifndef EIO_FINISH |
15 | #ifndef EIO_FINISH |
17 | # define EIO_FINISH(req) ((req)->finish) && !EIO_CANCELLED (req) ? (req)->finish (req) : 0 |
16 | # define EIO_FINISH(req) ((req)->finish) && !EIO_CANCELLED (req) ? (req)->finish (req) : 0 |
18 | #endif |
17 | #endif |
19 | |
18 | |
… | |
… | |
35 | # include <sys/time.h> |
34 | # include <sys/time.h> |
36 | # include <sys/select.h> |
35 | # include <sys/select.h> |
37 | # include <unistd.h> |
36 | # include <unistd.h> |
38 | # include <utime.h> |
37 | # include <utime.h> |
39 | # include <signal.h> |
38 | # include <signal.h> |
|
|
39 | # include <dirent.h> |
40 | |
40 | |
41 | # ifndef EIO_STRUCT_DIRENT |
41 | # ifndef EIO_STRUCT_DIRENT |
42 | # define EIO_STRUCT_DIRENT struct dirent |
42 | # define EIO_STRUCT_DIRENT struct dirent |
43 | # endif |
43 | # endif |
44 | |
44 | |
… | |
… | |
584 | #if !HAVE_READDIR_R |
584 | #if !HAVE_READDIR_R |
585 | # define readdir_r aio_readdir_r |
585 | # define readdir_r aio_readdir_r |
586 | |
586 | |
587 | static mutex_t readdirlock = X_MUTEX_INIT; |
587 | static mutex_t readdirlock = X_MUTEX_INIT; |
588 | |
588 | |
589 | static int readdir_r (DIR *dirp, X_DIRENT *ent, X_DIRENT **res) |
589 | static int readdir_r (DIR *dirp, EIO_STRUCT_DIRENT *ent, EIO_STRUCT_DIRENT **res) |
590 | { |
590 | { |
591 | X_DIRENT *e; |
591 | EIO_STRUCT_DIRENT *e; |
592 | int errorno; |
592 | int errorno; |
593 | |
593 | |
594 | X_LOCK (readdirlock); |
594 | X_LOCK (readdirlock); |
595 | |
595 | |
596 | e = readdir (dirp); |
596 | e = readdir (dirp); |