diff --git a/src/nnn.c b/src/nnn.c index ccbebe742..8acc427da 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -28,13 +28,16 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define _FILE_OFFSET_BITS 64 /* Support large files on 32-bit glibc */ - #if defined(__linux__) || defined(MINGW) || defined(__MINGW32__) \ || defined(__MINGW64__) || defined(__CYGWIN__) #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif +#include /* __GLIBC__ etc */ +/* large file support on 32-bit glibc >= 2.23 where fts.h supports it */ +#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 23) +#define _FILE_OFFSET_BITS 64 +#endif #if defined(__linux__) #include #define LINUX_INOTIFY