disable _FILE_OFFSET_BITS in mmap_hook.cc

Debian is doing massive rebuild of everything with 64-bit off_t (and
time_t), but on those systems where it matters, glibc still has mmap
with 32-bit off_t argument and mmap64 with 64-bit off_t. Since we're
aiming to match glibc's ABI, we need to see system's native off_t
width.
This commit is contained in:
Aliaksey Kandratsenka 2024-03-01 16:25:11 -05:00
parent 37b59a206e
commit 198b3dd2d0

View File

@ -29,6 +29,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// We require "native" off_t for the system. So that we're able to
// interpose native libc's mmap/mmap64 correctly. Thus we "turn off"
// _FILE_OFFSET_BITS define even if user asked for 64-bit off_t.
#undef _FILE_OFFSET_BITS
#include <config.h>
#include "mmap_hook.h"