Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jun 2023 18:06:32 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 0e77cfcef8a5 - main - graphics/ocaml-lablgl: fix build with clang 16
Message-ID:  <202306161806.35GI6W6b006961@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0e77cfcef8a5677cff1ba81430b767a1089fd083

commit 0e77cfcef8a5677cff1ba81430b767a1089fd083
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-06-15 19:31:27 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-06-16 18:05:43 +0000

    graphics/ocaml-lablgl: fix build with clang 16
    
    Clang 16 has a new error about incompatible function types, which shows
    up when building graphics/ocaml-lablgl:
    
      togl.c:820:26: error: incompatible function pointer types assigning to 'void (*)(Tk_Window, Tk_ClassProcs *, ClientData)' (aka 'void (*)(struct Tk_Window_ *, struct Tk_ClassProcs *, void *)') from 'void (Tk_Window, const Tk_ClassProcs *, ClientData)' (aka 'void (struct Tk_Window_ *, const struct Tk_ClassProcs *, void *)') [-Wincompatible-function-pointer-types]
              SetClassProcsPtr = Tk_SetClassProcs;
                               ^ ~~~~~~~~~~~~~~~~
    
    This is because Tk_SetClassProcs() now takes a const Tk_ClassProcs
    pointer as its second parameter. Fix the SetClassProcsPtr declaration to
    match.
    
    PR:             272019
    Approved by:    fernape
    MFH:            2023Q2
---
 graphics/ocaml-lablgl/files/patch-Togl_src_Togl_togl.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/graphics/ocaml-lablgl/files/patch-Togl_src_Togl_togl.c b/graphics/ocaml-lablgl/files/patch-Togl_src_Togl_togl.c
new file mode 100644
index 000000000000..6830d96579fc
--- /dev/null
+++ b/graphics/ocaml-lablgl/files/patch-Togl_src_Togl_togl.c
@@ -0,0 +1,11 @@
+--- Togl/src/Togl/togl.c.orig	2013-09-20 10:50:36 UTC
++++ Togl/src/Togl/togl.c
+@@ -96,7 +96,7 @@ static void (*SetClassProcsPtr)
+ /* pointer to Tk_SetClassProcs function in the stub table */
+ 
+ static void (*SetClassProcsPtr)
+-        _ANSI_ARGS_((Tk_Window, Tk_ClassProcs *, ClientData));
++        _ANSI_ARGS_((Tk_Window, const Tk_ClassProcs *, ClientData));
+ #endif
+ 
+ /* 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202306161806.35GI6W6b006961>