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

Commits on Jul 20, 2023

  1. src/zfile.c: Use off_t instead of off64_t

    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]>
    listout committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    d7d30d8 View commit details
    Browse the repository at this point in the history