Skip to content

Commit

Permalink
define _FILE_OFFSET_BITS 64 unconditionally
Browse files Browse the repository at this point in the history
according to the manpage, it won't have any effect on 64bit system
anyways. and musl always uses 64bit so this macro doesn't have any
effect there either.
  • Loading branch information
N-R-K committed Jul 1, 2023
1 parent 26d5b5c commit db8b618
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/nnn.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,13 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#define _FILE_OFFSET_BITS 64 /* Support large files on 32-bit glibc */

This comment has been minimized.

Copy link
@vaygr

vaygr Sep 3, 2023

Contributor

@N-R-K mesonbuild/meson#3519

this broke build on my older system

This comment has been minimized.

Copy link
@N-R-K

N-R-K Sep 3, 2023

Author Collaborator

@vaygr That's a bug in older glibc that's been fixed for ~8 years now. See #1678.

This comment has been minimized.

Copy link
@N-R-K

N-R-K Sep 3, 2023

Author Collaborator

Also note that glibc recommends defining _FILE_OFFSET_BITS 64 unconditionally.


#if defined(__linux__) || defined(MINGW) || defined(__MINGW32__) \
|| defined(__MINGW64__) || defined(__CYGWIN__)
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#if defined(__arm__) || defined(__i386__)
#define _FILE_OFFSET_BITS 64 /* Support large files on 32-bit */
#endif
#if defined(__linux__)
#include <sys/inotify.h>
#define LINUX_INOTIFY
Expand Down

0 comments on commit db8b618

Please sign in to comment.