From bb7154fb800eb410fb7cc4c353975787353f2246 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 16 Oct 2024 10:02:01 +0200 Subject: [PATCH] Fix build failure with GCC 14 and musl on 32-bit systems. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . This fixes this error when compiling with GCC 14 and musl libc on 32-bit Alpine Linux: filesys.c: In function 'scm_sendfile': filesys.c:1405:16: error: assignment to 'off_t *' {aka 'long long int *'} from incompatible pointer type 'scm_t_off *' {aka 'long int *'} [-Wincompatible-pointer-types] 1405 | offset_ptr = SCM_UNBNDP (offset) ? NULL : &c_offset; | ^ * libguile/filesys.c (scm_sendfile): Change type of ‘c_offset’. Signed-off-by: Ludovic Courtès --- NEWS | 2 ++ libguile/filesys.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 085a3f0e6..83788adc7 100644 --- a/NEWS +++ b/NEWS @@ -39,6 +39,8 @@ downright unusable (e.g., ), non-conforming () ** Fix portability issues for macOS () +** Fix compilation with GCC 14 and musl on 32-bit systems + () Changes in 3.0.10 (since 3.0.9) diff --git a/libguile/filesys.c b/libguile/filesys.c index 6896e00ea..b70fbb1ce 100644 --- a/libguile/filesys.c +++ b/libguile/filesys.c @@ -1397,7 +1397,7 @@ SCM_DEFINE (scm_sendfile, "sendfile", 3, 1, 0, ssize_t result SCM_UNUSED; size_t c_count, total = 0; - scm_t_off c_offset; + off_t c_offset; int in_fd, out_fd; VALIDATE_FD_OR_PORT (out_fd, out, 1);