From 66b035e0011b5ec6fada24f4f110ca28efac6360 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 14 Apr 2023 09:02:04 +0200 Subject: [PATCH] Port to C99 Related to: --- gavl-c99.patch | 21 +++++++++++++++++++++ gavl-configure-c99.patch | 22 ++++++++++++++++++++++ gavl.spec | 9 ++++++++- 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 gavl-c99.patch create mode 100644 gavl-configure-c99.patch diff --git a/gavl-c99.patch b/gavl-c99.patch new file mode 100644 index 0000000..1e0cf23 --- /dev/null +++ b/gavl-c99.patch @@ -0,0 +1,21 @@ +Include for memset, to avoid an implicit function +declaration and build failures with future compilers. + +Fixed upstream as part of: + +r5451 | gmerlin | 2018-11-27 20:38:42 +0100 (Tue, 27 Nov 2018) | 2 lines + +* Update + +diff --git a/src/fill_test.c b/src/fill_test.c +index 1d362bea4af85745..6fd97dab9e192baa 100644 +--- a/src/fill_test.c ++++ b/src/fill_test.c +@@ -23,6 +23,7 @@ + //#include "colorspace.h" // Common routines + #include + #include ++#include + + static void + write_png(char * filename, gavl_video_format_t * format, gavl_video_frame_t * frame) diff --git a/gavl-configure-c99.patch b/gavl-configure-c99.patch new file mode 100644 index 0000000..34383cc --- /dev/null +++ b/gavl-configure-c99.patch @@ -0,0 +1,22 @@ +Avoid an implicit int in the clock_gettime test, to keep the same test +outcome with future compilers that do not support implicit ints. + +Fixed upstream as part of: + +r6246 | gmerlin | 2021-09-01 11:46:30 +0200 (Wed, 01 Sep 2021) | 2 lines + +Applied cross-building.patch by Helmut Grohne + +diff --git a/configure.ac b/configure.ac +index 90b0be6c89df4b3b..1df85ad6c222ce8d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -162,7 +162,7 @@ AC_MSG_CHECKING(for CLOCK_MONOTONIC) + AC_TRY_RUN([ + #include + #include +-main() ++int main(void) + { + struct timespec tp; + if(clock_gettime(CLOCK_MONOTONIC, &tp)) diff --git a/gavl.spec b/gavl.spec index f2dcf76..1415014 100644 --- a/gavl.spec +++ b/gavl.spec @@ -1,12 +1,14 @@ Name: gavl Version: 1.4.0 -Release: 22%{?dist} +Release: 23%{?dist} Summary: A library for handling uncompressed audio and video data License: GPLv3+ URL: http://gmerlin.sourceforge.net/ Source0: http://downloads.sourceforge.net/gmerlin/gavl-%{version}.tar.gz Patch1: gavl-1.1.1-system_libgdither.patch +Patch2: gavl-configure-c99.patch +Patch3: gavl-c99.patch BuildRequires: libtool @@ -44,6 +46,8 @@ developing applications that use %{name}. %prep %setup -q %patch1 -p1 -b .gdither +%patch2 -p1 +%patch3 -p1 #Disable buildtime cpu detection sed -i -i 's/LQT_TRY_CFLAGS/dnl LQT_TRY_CFLAGS/g' configure.ac @@ -90,6 +94,9 @@ touch -r include/gavl/gavl.h $RPM_BUILD_ROOT%{_includedir}/gavl/gavl_version.h %changelog +* Fri Apr 14 2023 Florian Weimer - 1.4.0-23 +- Port to C99 + * Thu Jan 19 2023 Fedora Release Engineering - 1.4.0-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild