Skip to content

Commit

Permalink
Disable large file support on old glibc
Browse files Browse the repository at this point in the history
On glibc <2.23 fts.h doesn't support the feature:

https://sourceware.org/bugzilla/show_bug.cgi?id=11460
  • Loading branch information
sjmulder committed Jul 15, 2024
1 parent 86d883e commit 207b611
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/nnn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <features.h> /* __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 <sys/inotify.h>
#define LINUX_INOTIFY
Expand Down

0 comments on commit 207b611

Please sign in to comment.