File fix_glib_284_compat.patch of Package siril

From 1041f25fd1d04330626601185907373c2e69e709 Mon Sep 17 00:00:00 2001
From: cissou8 <cissou8@gmail.com>
Date: Mon, 10 Mar 2025 23:30:48 +0100
Subject: [PATCH] fixes #1516 (glib compile error)

was due to an update in glib 2.84 that needed
had to move some extern C defs around to make it compile again

(cherry picked from commit 9186b0c0110aa332a99d578664e69cd26cae953b)
---
 src/filters/da3d/DA3D.cpp       | 4 ++--
 src/filters/nlbayes/NlBayes.cpp | 2 --
 src/opencv/opencv.h             | 8 ++++----
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/filters/da3d/DA3D.cpp b/src/filters/da3d/DA3D.cpp
index b0b222354d..c65ed8d32b 100644
--- a/src/filters/da3d/DA3D.cpp
+++ b/src/filters/da3d/DA3D.cpp
@@ -15,10 +15,10 @@
 #include "WeightMap.hpp"
 #include "Utils.hpp"
 #include "DftPatch.hpp"
-extern "C" {
+
 #include "core/processing.h"
 #include "gui/progress_and_log.h"
-}
+
 
 #ifdef _OPENMP
 #include <omp.h>
diff --git a/src/filters/nlbayes/NlBayes.cpp b/src/filters/nlbayes/NlBayes.cpp
index 0f77ce05b4..b2394f2e54 100644
--- a/src/filters/nlbayes/NlBayes.cpp
+++ b/src/filters/nlbayes/NlBayes.cpp
@@ -27,11 +27,9 @@
 #include "LibMatrix.h"
 #include "LibImages.h"
 #include "Utilities.h"
-extern "C" {
 #include "algos/anscombe.h"
 #include "core/processing.h"
 #include "gui/progress_and_log.h"
-}
 
 #ifdef _OPENMP
 #include <omp.h>
diff --git a/src/opencv/opencv.h b/src/opencv/opencv.h
index 0b7fe5191d..3fd3b07c01 100644
--- a/src/opencv/opencv.h
+++ b/src/opencv/opencv.h
@@ -5,16 +5,16 @@
 #  include <config.h>
 #endif
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include <stdint.h>
 #include "registration/registration.h"
 #include "registration/matching/misc.h"
 #include "registration/matching/atpmatch.h"
 #include "gui/progress_and_log.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 WORD *fits_to_bgrbgr_ushort(fits *image);
 float *fits_to_bgrbgr_float(fits *image);
 
-- 
GitLab

openSUSE Build Service is sponsored by