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

On GLIBC, compile libgit2 with -D_FILE_OFFSET_BITS=64. #862

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

Conversation

sunfishcode
Copy link
Member

On GLIBC, compile libgit2 with -D_FILE_OFFSET_BITS=64. On 32-bit
architectures, this is needed for libgit2 to access files larger than 2 GiB.

While here, also use -D_TIME_BITS=64, which is needed on GLIBC on 32-bit
architectures for libgit2 to work correctly in in the year 2038 and beyond.

On GLIBC, compile libgit2 with `-D_FILE_OFFSET_BITS=64`. On 32-bit
architectures, this is needed for libgit2 to access files larger than 2 GiB.

While here, also use `-D_TIME_BITS=64`, which is needed on GLIBC on 32-bit
architectures for libgit2 to work correctly in in the year 2038 and beyond.
@joshtriplett
Copy link
Member

@sunfishcode To what extent does this change the public ABI of the libgit2 C library? If people are calling functions in libgit2-sys directly, will any of that code break?

@sunfishcode
Copy link
Member Author

libgit2 uses its own typedefs for file offsets and times in its public API, specifically to avoid being affected by this issue.

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