Fix C compatibility issue in the configure script
Related to: <https://fedoraproject.org/wiki/Changes/PortingToModernC> <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
parent
392bd8f6af
commit
87291dc73c
35
libxcrypt-configure-c99.patch
Normal file
35
libxcrypt-configure-c99.patch
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
Author: Florian Weimer <fweimer@redhat.com>
|
||||||
|
Date: Tue Dec 19 11:00:11 2023 +0100
|
||||||
|
|
||||||
|
configure: Only text the makecontext signature we need
|
||||||
|
|
||||||
|
The test/explicit-bzero.c test uses a start routine without any
|
||||||
|
arguments. There is no need for the multi-argument version.
|
||||||
|
|
||||||
|
This avoids a build failure with glibc and future compilers.
|
||||||
|
The GNU C library declares the makecontext callback of
|
||||||
|
type void (*) (void), so no cast is needed. On other systems,
|
||||||
|
the type may be the (currently distinct) type void (*) (),
|
||||||
|
but given that this only affects the ability to execute a test,
|
||||||
|
no further machinery is added here to detect that different type.
|
||||||
|
|
||||||
|
Submitted upstream: <https://github.com/besser82/libxcrypt/pull/178>
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 35965b3b20466f71..ecc71b02b8c9752f 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -303,13 +303,11 @@ AS_IF([test $ac_cv_header_ucontext_h = yes],
|
||||||
|
#include <ucontext.h>
|
||||||
|
static int x;
|
||||||
|
static void fn1(void) {}
|
||||||
|
-static void fn2(int a, int b) { x = a - b; }
|
||||||
|
]], [[
|
||||||
|
ucontext_t uc1, uc2;
|
||||||
|
if (getcontext(&uc1)) return 1;
|
||||||
|
if (setcontext(&uc1)) return 1;
|
||||||
|
makecontext(&uc1, fn1, 0);
|
||||||
|
- makecontext(&uc2, fn2, 2, 1, 1);
|
||||||
|
if (swapcontext(&uc1, &uc2)) return 1;
|
||||||
|
return x;
|
||||||
|
]])],
|
@ -168,7 +168,7 @@ fi \
|
|||||||
|
|
||||||
Name: libxcrypt
|
Name: libxcrypt
|
||||||
Version: 4.4.36
|
Version: 4.4.36
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Extended crypt library for descrypt, md5crypt, bcrypt, and others
|
Summary: Extended crypt library for descrypt, md5crypt, bcrypt, and others
|
||||||
|
|
||||||
# For explicit license breakdown, see the
|
# For explicit license breakdown, see the
|
||||||
@ -179,6 +179,7 @@ Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.xz
|
|||||||
Source1: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.xz.asc
|
Source1: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.xz.asc
|
||||||
Source2: %{url}/releases/download/v%{version}/%{name}-gpgkey.gpg
|
Source2: %{url}/releases/download/v%{version}/%{name}-gpgkey.gpg
|
||||||
Source3: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.xz.sha256sum
|
Source3: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.xz.sha256sum
|
||||||
|
Patch0: libxcrypt-configure-c99.patch
|
||||||
|
|
||||||
# Patch 0000 - 2999: Backported patches from upstream.
|
# Patch 0000 - 2999: Backported patches from upstream.
|
||||||
|
|
||||||
@ -584,6 +585,9 @@ done
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 19 2023 Florian Weimer <fweimer@redhat.com> - 4.4.36-3
|
||||||
|
- Fix C compatibility issue in the configure script
|
||||||
|
|
||||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.36-2
|
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.36-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user