ggreer / the_silver_searcher

A code-searching tool similar to ack, but faster.
http://geoff.greer.fm/ag/
Apache License 2.0
26.2k stars 1.43k forks source link

src/zfile.c: Use off_t instead of off64_t #1525

Open listout opened 1 year ago

listout commented 1 year ago

First discovered in while building on musl 1. This is because musl-1.2.4 (9999 right now) will remove/removes the LFS compatibility hacks, like fopen64:

The gist is that bad configure tests (suffering from -Wimplicit-function-declaration) would build and link successfully because musl provided these symbols as aliases, despite not needing them (musl natively supports both LFS & time64).

To head this off, these aliases are now gone, but remain in libc.so for binary compatibility.

The proper fix is to just use the regular functions and not anything _LARGEFILE64_SOURCE As a temporary workaround you can typedef off_t to off64_t 2 to get it working.

Signed-off-by: Brahmajit Das brahmajit.xyz@gmail.com

liweitianux commented 12 months ago

This issue also occurs on DragonFly BSD. I found another way to fix it is to change off64_t to z_off64_t as defined in zconf.h, which has already been included by zfile.c.

listout commented 11 months ago

@ggreer any plans on fixing this?