Backport upstream commit to improve C99 compatibility

Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
Florian Weimer 2022-12-06 08:36:45 +01:00
parent 671e6f4ba9
commit 1a19a61f96
2 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,17 @@
Add missing types to the inline keyword check, otherwise the check
might fail incorrectly with strict C99 compilers which do not support
implicit int.
diff --git a/build/make/configure.sh b/build/make/configure.sh
index 79e6f59c2df38d38..4f8dc59b7ee0290b 100644
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -1511,7 +1511,7 @@ EOF
# Try to find which inline keywords are supported
check_cc <<EOF && INLINE="inline"
-static inline function() {}
+static inline void function(void) {}
EOF
# Almost every platform uses pthreads.

View File

@ -6,7 +6,7 @@
Name: libvpx Name: libvpx
Summary: VP8/VP9 Video Codec SDK Summary: VP8/VP9 Video Codec SDK
Version: 1.12.0 Version: 1.12.0
Release: 1%{?dist} Release: 2%{?dist}
License: BSD License: BSD
Source0: https://github.com/webmproject/libvpx/archive/v%{version}.tar.gz Source0: https://github.com/webmproject/libvpx/archive/v%{version}.tar.gz
Source1: vpx_config.h Source1: vpx_config.h
@ -22,6 +22,7 @@ BuildRequires: yasm
BuildRequires: doxygen, php-cli, perl(Getopt::Long) BuildRequires: doxygen, php-cli, perl(Getopt::Long)
# Do not disable FORTIFY_SOURCE=2 # Do not disable FORTIFY_SOURCE=2
Patch0: libvpx-1.7.0-leave-fortify-source-on.patch Patch0: libvpx-1.7.0-leave-fortify-source-on.patch
Patch1: libvpx-configure-c99.patch
%description %description
libvpx provides the VP8/VP9 SDK, which allows you to integrate your applications libvpx provides the VP8/VP9 SDK, which allows you to integrate your applications
@ -47,6 +48,7 @@ and decoder.
%prep %prep
%setup -q -n libvpx-%{version} %setup -q -n libvpx-%{version}
%patch0 -p1 -b .leave-fs-on %patch0 -p1 -b .leave-fs-on
%patch1 -p1
%build %build
@ -233,6 +235,9 @@ rm -rf %{buildroot}%{_prefix}/src
%{_bindir}/* %{_bindir}/*
%changelog %changelog
* Tue Dec 6 2022 Florian Weimer <fweimer@redhat.com> - 1.12.0-2
- Backport upstream commit to improve C99 compatibility
* Wed Aug 17 2022 Pete Walter <pwalter@fedoraproject.org> - 1.12.0-1 * Wed Aug 17 2022 Pete Walter <pwalter@fedoraproject.org> - 1.12.0-1
- Update to 1.12.0 - Update to 1.12.0