summaryrefslogtreecommitdiff
path: root/sci-libs/cgnslib/files/cgnslib-4.4.0-c99.patch
blob: f0caba2045a6dee03945f21e8209a32aaa7ad20c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
https://github.com/CGNS/CGNS/pull/757
https://github.com/CGNS/CGNS/pull/757

From 4d791bccf1f2341de9091eb22d2ce225ec9139f7 Mon Sep 17 00:00:00 2001
From: Mickael Philit <mickey.phy@gmail.com>
Date: Sun, 3 Mar 2024 20:54:39 +0100
Subject: [PATCH] backport gcc14 fedora patch

---
 src/cgnstools/tkogl/gencyl.c | 4 ++--
 src/cgnstools/tkogl/tkogl.c  | 8 +++++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/cgnstools/tkogl/gencyl.c b/src/cgnstools/tkogl/gencyl.c
index cc36c4ba6..b64d777f4 100644
--- a/src/cgnstools/tkogl/gencyl.c
+++ b/src/cgnstools/tkogl/gencyl.c
@@ -682,8 +682,8 @@ RenderModel (Model* model)
       Vector normal;
       GLdouble v [3];
       obj = gluNewTess();
-      gluTessCallback(obj, GLU_BEGIN, glBegin);
-      gluTessCallback(obj, GLU_VERTEX, glVertex3fv);
+      gluTessCallback(obj, GLU_BEGIN, (_GLUfuncptr)glBegin);
+      gluTessCallback(obj, GLU_VERTEX, (_GLUfuncptr)glVertex3fv);
       gluTessCallback(obj, GLU_END, glEnd);
       if (flags&CLOSE_FIRST) {
          CrossSection *a = model->cross [0];
diff --git a/src/cgnstools/tkogl/tkogl.c b/src/cgnstools/tkogl/tkogl.c
index e697e735e..506599d54 100644
--- a/src/cgnstools/tkogl/tkogl.c
+++ b/src/cgnstools/tkogl/tkogl.c
@@ -22,6 +22,12 @@
 #include "printstr.h"
 #include "feedback.h"
 
+#if ! defined(__WIN32__) && ! defined(_WIN32)
+/* For TkWmAddToColormapWindows. */
+#define _TKPORT /* Typical installations cannot find tkPort.h. */
+#include <tkInt.h>
+#endif
+
 #ifndef CONST
 # define CONST
 #endif
@@ -599,7 +605,7 @@ OGLwinCmd(clientData, interp, argc, argv)
 
     if ((Tk_Parent(tkwin) != NULL) &&
 	(Tk_Colormap(tkwin) != Tk_Colormap (Tk_Parent(tkwin)))) {
-       TkWmAddToColormapWindows(tkwin);
+       TkWmAddToColormapWindows((TkWindow *)tkwin);
     }
 
     /* See if this window will share display lists with another */