From 42338f774ddd22ed2c9bc2eb6d4755250c1a0608 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sun, 9 Jul 2023 18:15:38 +0200 Subject: [PATCH] - added more fixes for gcc 13 --- camwire-bounds.patch | 10 ++++++++++ camwire-build.patch | 36 ++++++++++++++++++++++++++++++++++++ camwire.spec | 4 +++- 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 camwire-build.patch diff --git a/camwire-bounds.patch b/camwire-bounds.patch index 3339214..59459ba 100644 --- a/camwire-bounds.patch +++ b/camwire-bounds.patch @@ -37,3 +37,13 @@ } else { +--- camwire2-2.0.0-Source/camwire/camwire.c.orig 2015-05-21 23:38:31.000000000 +0200 ++++ camwire2-2.0.0-Source/camwire/camwire.c 2023-07-09 12:05:54.227004109 +0200 +@@ -3355,6 +3355,7 @@ static FILE * open_named_conf_file(const + } + } + strncat(conffilename, filename, CAMWIRE_ID_MAX_CHARS); ++ conffilename[CAMWIRE_ID_MAX_CHARS] = '\n'; + strncat(conffilename, CONFFILE_EXTENSION, + CONFFILE_EXTENSION_MAX_CHARS); + return fopen(conffilename, "r"); diff --git a/camwire-build.patch b/camwire-build.patch new file mode 100644 index 0000000..f68b2de --- /dev/null +++ b/camwire-build.patch @@ -0,0 +1,36 @@ +--- camwire2-2.0.0-Source/camwire/camwire.c.orig 2015-05-21 23:38:31.000000000 +0200 ++++ camwire2-2.0.0-Source/camwire/camwire.c 2023-07-09 13:17:11.497358571 +0200 +@@ -3098,13 +3098,10 @@ int camwire_debug_print_status(const Cam + else + fprintf(stderr, " (null)\n"); + fprintf(stderr, "features:"); +- if (internal_status->feature_set.feature) + { + fprintf(stderr, "\n"); + dc1394_feature_print_all(&(internal_status->feature_set), stderr); + } +- else +- fprintf(stderr, " (null)\n"); + fprintf(stderr, "frame:"); + capture_frame = internal_status->frame; + if (capture_frame) +@@ -5130,7 +5128,7 @@ static uint32_t convert_framerate2numpac + Returns the libdc1394 colour coding ID that supports the given pixel + coding, or 0 on error. The coding_list argument must not be empty. + */ +-static uint32_t convert_pixelcoding2colorid(const Camwire_pixel coding, ++static dc1394color_coding_t convert_pixelcoding2colorid(const Camwire_pixel coding, + const dc1394color_codings_t *coding_list) + { + switch (coding) +--- camwire2-2.0.0-Source/examples/cammonitor/cammonitor.c.orig 2023-07-09 13:33:19.929405910 +0200 ++++ camwire2-2.0.0-Source/examples/cammonitor/cammonitor.c 2023-07-09 18:09:53.211009381 +0200 +@@ -1817,7 +1817,7 @@ static int set_colour_corr(const Camwire + Returns the colour correction coefficients obtained from the user, + after setting the camera accordingly. + */ +-static void set_colour_coef(const Camwire_handle c_handle, double coef[]) ++static void set_colour_coef(const Camwire_handle c_handle, double coef[9]) + { + int gotinput; + diff --git a/camwire.spec b/camwire.spec index dbeff7d..a708b20 100644 --- a/camwire.spec +++ b/camwire.spec @@ -2,7 +2,7 @@ Summary: Digital camera library for Linux Summary(pl.UTF-8): Biblioteka obsługi kamer cyfrowych dla Linuksa Name: camwire Version: 2.0.0 -Release: 2 +Release: 3 License: LGPL v2.1+ Group: Libraries # camwire1 was for libdc1394 < 2.0, camwire2 for libdc1394 2.1+ @@ -14,6 +14,7 @@ Patch2: %{name}-lib.patch Patch3: %{name}-bogus-inline.patch Patch4: %{name}-format.patch Patch5: %{name}-bounds.patch +Patch6: %{name}-build.patch URL: http://kauri.auck.irl.cri.nz/~johanns/camwire/ BuildRequires: SDL-devel BuildRequires: cmake >= 2.6 @@ -81,6 +82,7 @@ Camwire. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 %build install -d build -- 2.44.0