| 750 | } |
| 751 | |
| 752 | static inline struct dirent* yreaddir(DIR* dir, struct dirent* de) { |
| 753 | // TODO(yazevnul|IGNIETFERRO-1070): remove these macroses by replacing `readdir_r` with proper |
| 754 | // alternative |
| 755 | Y_PRAGMA_DIAGNOSTIC_PUSH |
| 756 | Y_PRAGMA_NO_DEPRECATED |
| 757 | if (readdir_r(dir, de, &de) == 0) { |
| 758 | Y_PRAGMA_DIAGNOSTIC_POP |
| 759 | return de; |
| 760 | } |
| 761 | |
| 762 | return nullptr; |
| 763 | } |
| 764 | |
| 765 | /* |
| 766 | * This is the tricky part -- do not casually change *anything* in here. The |