git2-rs icon indicating copy to clipboard operation
git2-rs copied to clipboard

On GLIBC, compile libgit2 with `-D_FILE_OFFSET_BITS=64`.

Open sunfishcode opened this issue 3 years ago • 2 comments

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.

sunfishcode avatar Jul 21 '22 13:07 sunfishcode

@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?

joshtriplett avatar Jul 23 '22 04:07 joshtriplett

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

sunfishcode avatar Jul 23 '22 15:07 sunfishcode