… | |
… | |
316 | |
316 | |
317 | struct tmpbuf; |
317 | struct tmpbuf; |
318 | |
318 | |
319 | #if _POSIX_VERSION >= 200809L |
319 | #if _POSIX_VERSION >= 200809L |
320 | #define HAVE_AT 1 |
320 | #define HAVE_AT 1 |
321 | # define WD2FD(wd) ((wd) ? (wd)->fd : AT_FDCWD) |
321 | #define WD2FD(wd) ((wd) ? (wd)->fd : AT_FDCWD) |
322 | #ifndef O_SEARCH |
322 | #ifndef O_SEARCH |
323 | #define O_SEARCH O_RDONLY |
323 | #define O_SEARCH O_RDONLY |
324 | #endif |
324 | #endif |
325 | #else |
325 | #else |
326 | #define HAVE_AT 0 |
326 | #define HAVE_AT 0 |
… | |
… | |
1784 | |
1784 | |
1785 | if (fd < 0) |
1785 | if (fd < 0) |
1786 | return; |
1786 | return; |
1787 | |
1787 | |
1788 | dirp = fdopendir (fd); |
1788 | dirp = fdopendir (fd); |
|
|
1789 | |
|
|
1790 | if (!dirp) |
|
|
1791 | close (fd); |
1789 | } |
1792 | } |
1790 | else |
1793 | else |
1791 | dirp = opendir (req->ptr1); |
1794 | dirp = opendir (req->ptr1); |
1792 | #else |
1795 | #else |
1793 | dirp = opendir (wd_expand (&self->tmpbuf, req->wd, req->ptr1)); |
1796 | dirp = opendir (wd_expand (&self->tmpbuf, req->wd, req->ptr1)); |