guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 07/07: Fix build failure with GCC 14 and musl on 32-bit


From: Ludovic Courtès
Subject: [Guile-commits] 07/07: Fix build failure with GCC 14 and musl on 32-bit systems.
Date: Sat, 26 Oct 2024 13:45:59 -0400 (EDT)

civodul pushed a commit to branch main
in repository guile.

commit bb7154fb800eb410fb7cc4c353975787353f2246
Author: Natanael Copa <ncopa@alpinelinux.org>
AuthorDate: Wed Oct 16 10:02:01 2024 +0200

    Fix build failure with GCC 14 and musl on 32-bit systems.
    
    Fixes <https://bugs.gnu.org/73835>.
    
    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 <ludo@gnu.org>
---
 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., <https://bugs.gnu.org/72378>), 
non-conforming
    (<https://bugs.gnu.org/73167>)
 ** Fix portability issues for macOS
    (<https://bugs.gnu.org/72547>)
+** Fix compilation with GCC 14 and musl on 32-bit systems
+   (<https://bugs.gnu.org/73835>)
 
 
 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);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]