From 931df9dd83e7feea11197402c5b4e7ad489f4abf Mon Sep 17 00:00:00 2001 From: equitably <71963108+equitably@users.noreply.github.com> Date: Wed, 23 Aug 2023 19:28:58 -0400 Subject: [PATCH] Update output_file.cpp --- output_file.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output_file.cpp b/output_file.cpp index b5809ad..7f1f173 100644 --- a/output_file.cpp +++ b/output_file.cpp @@ -657,7 +657,7 @@ int write_fd_chunk(struct output_file* out, unsigned int len, int fd, int64_t of uint64_t buffer_size; char* ptr; - aligned_offset = offset & ~(4096 - 1); + aligned_offset = offset & ~(sysconf(_SC_PAGESIZE) - 1); aligned_diff = offset - aligned_offset; buffer_size = (uint64_t)len + (uint64_t)aligned_diff;