diff --git a/src/nnn.c b/src/nnn.c index ccbebe742..544c388bf 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 !defined(__GLIBC__) || __GLIBC__ > 2 || __GLIBC_MINOR__ >= 23 +#define _FILE_OFFSET_BITS 64 +#endif #if defined(__linux__) #include #define LINUX_INOTIFY