Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

listout
Copy link

@listout listout commented Jul 20, 2023

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 [email protected]

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:
  - https://git.musl-libc.org/cgit/musl/commit/?id=246f1c811448f37a44b41cd8df8d0ef9736d95f4
  - https://git.musl-libc.org/cgit/musl/commit/?id=25e6fee27f4a293728dd15b659170e7b9c7db9bc

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.

[1]: https://bugs.gentoo.org/908582
[2]: gentoo/gentoo#31186
Signed-off-by: Brahmajit Das <[email protected]>
algitbot pushed a commit to alpinelinux/aports that referenced this pull request Oct 22, 2023
Apply the patch from [a PR][0] to the_silver_searcher.

[0]:ggreer/the_silver_searcher#1525
@liweitianux
Copy link

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
Copy link
Author

listout commented Dec 19, 2023

@ggreer any plans on fixing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants