Fix FTBFS with GCC 14 due to incompatible pointers

- Fixes: rhbz#2261538
This commit is contained in:
Charalampos Stratakis 2024-03-19 18:15:19 +01:00 committed by Miro Hrončok
parent afa07d2865
commit 9bc784e32b
2 changed files with 28 additions and 0 deletions

22
010-fix-pointers.patch Normal file
View File

@ -0,0 +1,22 @@
From 789f964fff59c722b0872abcdc56d2b1373a9f3b Mon Sep 17 00:00:00 2001
From: mattip <matti.picus@gmail.com>
Date: Tue, 19 Mar 2024 08:36:55 +0200
Subject: [PATCH] fix 'const' in signature of gdbm_open (issue 4926)
---
lib_pypy/_gdbm_build.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib_pypy/_gdbm_build.py b/lib_pypy/_gdbm_build.py
index 8578874554f..113f5496dc0 100644
--- a/lib_pypy/_gdbm_build.py
+++ b/lib_pypy/_gdbm_build.py
@@ -11,7 +11,7 @@
#define GDBM_NOLOCK ...
#define GDBM_REPLACE ...
-void* gdbm_open(char *, int, int, int, void (*)());
+void* gdbm_open(const char *, int, int, int, void (*)(const char *));
void gdbm_close(void*);
typedef struct {

View File

@ -171,6 +171,12 @@ Patch1: 007-remove-startup-message.patch
# https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt # https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt
Patch2: 009-add-libxcrypt-support.patch Patch2: 009-add-libxcrypt-support.patch
# Fix function signatures uncovered by GCC 14 enforcement of
# -Wincompatible-pointer-types
# Resolved upstream:
# https://github.com/pypy/pypy/commit/789f964fff59c722b0872abcdc56d2b1373a9f3b
Patch3: 010-fix-pointers.patch
# Instead of bundled wheels, use our RPM packaged wheels from # Instead of bundled wheels, use our RPM packaged wheels from
# /usr/share/python-wheels # /usr/share/python-wheels
# We conditionally apply this, but we use autosetup, so we use Source here # We conditionally apply this, but we use autosetup, so we use Source here