# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/libbluray/hotfix-32bit.patch # Copyright (C) 2025 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- Fix truncating files at nearly 4GB on 32-bit systems. René Rebe --- libbluray-1.3.4/src/examples/bdsplice.c.vanilla 2025-06-16 02:13:58.666644877 +0300 +++ libbluray-1.3.4/src/examples/bdsplice.c 2025-06-16 02:30:38.947490158 +0300 @@ -66,8 +66,7 @@ int verbose = 0; int64_t total = 0; int64_t pos, end_pos = -1; - size_t size, wrote; - int bytes; + size_t size, wrote, bytes; int title_count; BLURAY *bd; int chapter_start = 0; @@ -204,7 +203,7 @@ pos = bd_tell(bd); while (end_pos < 0 || pos < end_pos) { size = BUF_SIZE; - if (size > (size_t)(end_pos - pos)) { + if (size > (uint64_t)(end_pos - pos)) { size = end_pos - pos; } bytes = bd_read(bd, buf, size);