Port configure script to C99
Related to: <https://fedoraproject.org/wiki/Changes/PortingToModernC> <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
parent
35cb0afc6a
commit
5a0a5922f1
37
kmod-configure-c99.patch
Normal file
37
kmod-configure-c99.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
configure.ac: In _Noreturn check, include <stdlib.h> for exit
|
||||||
|
|
||||||
|
Otherwise, an implicit functiona declaration is used, causing
|
||||||
|
a C99 compatibility issue.
|
||||||
|
|
||||||
|
Submitted upstream:
|
||||||
|
|
||||||
|
<https://lore.kernel.org/linux-modules/877cyq6kh9.fsf@oldenburg.str.redhat.com/>
|
||||||
|
|
||||||
|
diff --git a/configure b/configure
|
||||||
|
index d053310a8b4a313a..ec1f12d02428f848 100755
|
||||||
|
--- a/configure
|
||||||
|
+++ b/configure
|
||||||
|
@@ -14021,7 +14021,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||||
|
printf %s "checking whether _Noreturn is supported... " >&6; }
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
-_Noreturn int foo(void) { exit(0); }
|
||||||
|
+#include <stdlib.h>
|
||||||
|
+ _Noreturn int foo(void) { exit(0); }
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_compile "$LINENO"
|
||||||
|
then :
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 6989e9360da23721..12e0518533201ccf 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -68,7 +68,8 @@ AC_COMPILE_IFELSE(
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether _Noreturn is supported])
|
||||||
|
AC_COMPILE_IFELSE(
|
||||||
|
- [AC_LANG_SOURCE([[_Noreturn int foo(void) { exit(0); }]])],
|
||||||
|
+ [AC_LANG_SOURCE([[#include <stdlib.h>
|
||||||
|
+ _Noreturn int foo(void) { exit(0); }]])],
|
||||||
|
[AC_DEFINE([HAVE_NORETURN], [1], [Define if _Noreturn is available])
|
||||||
|
AC_MSG_RESULT([yes])],
|
||||||
|
[AC_MSG_RESULT([no])])
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
Name: kmod
|
Name: kmod
|
||||||
Version: 30
|
Version: 30
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Linux kernel module management utilities
|
Summary: Linux kernel module management utilities
|
||||||
|
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
@ -24,6 +24,7 @@ URL: https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git
|
|||||||
Source0: https://www.kernel.org/pub/linux/utils/kernel/kmod/%{name}-%{version}.tar.xz
|
Source0: https://www.kernel.org/pub/linux/utils/kernel/kmod/%{name}-%{version}.tar.xz
|
||||||
Source1: weak-modules
|
Source1: weak-modules
|
||||||
Source2: depmod.conf.dist
|
Source2: depmod.conf.dist
|
||||||
|
Patch0: kmod-configure-c99.patch
|
||||||
Exclusiveos: Linux
|
Exclusiveos: Linux
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
@ -69,6 +70,8 @@ applications that wish to load or unload Linux kernel modules.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
|
# Avoid rebuilding the autoconf scripts.
|
||||||
|
touch -r aclocal.m4 configure*
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure \
|
%configure \
|
||||||
@ -147,6 +150,9 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf
|
|||||||
%{_libdir}/libkmod.so
|
%{_libdir}/libkmod.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Dec 17 2022 Florian Weimer <fweimer@redhat.com> - 30-3
|
||||||
|
- Port configure script to C99
|
||||||
|
|
||||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 30-2
|
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 30-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user