commit:     4d3d40a29078d1796ed26b83d5a823155a5ce015
Author:     Pascal Jäger <pascal.jaeger <AT> leimstift <DOT> de>
AuthorDate: Sun Nov 13 14:05:40 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov 15 02:08:48 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d3d40a2

app-editors/xvile: fix build for clang16

Closes: https://bugs.gentoo.org/880941

Signed-off-by: Pascal Jäger <pascal.jaeger <AT> leimstift.de>
Closes: https://github.com/gentoo/gentoo/pull/28255
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/xvile-9.8w-fix-build-for-clang16.patch   | 27 ++++++++++++++++++++++
 .../{xvile-9.8w.ebuild => xvile-9.8w-r1.ebuild}    |  2 ++
 2 files changed, 29 insertions(+)

diff --git a/app-editors/xvile/files/xvile-9.8w-fix-build-for-clang16.patch 
b/app-editors/xvile/files/xvile-9.8w-fix-build-for-clang16.patch
new file mode 100644
index 000000000000..df5b6d605054
--- /dev/null
+++ b/app-editors/xvile/files/xvile-9.8w-fix-build-for-clang16.patch
@@ -0,0 +1,27 @@
+Clang16 will not allow implicit function pointer types by default.
+
+Bug: https://bugs.gentoo.org/880941
+Upstream Bug report and patch: https://savannah.nongnu.org/bugs/index.php?63356
+
+Signed-off-by: Pascal Jäger <[email protected]>
+
+--- a/x11.c
++++ b/x11.c
+@@ -2259,7 +2259,7 @@ x_preparse_args(int *pargc, char ***pargv)
+     if (isEmpty(xvile_class))
+       xvile_class = MY_CLASS;
+ 
+-    XtSetErrorHandler(initial_error_handler);
++    XtSetErrorHandler((__attribute__((noreturn)) 
XtErrorHandler)runtime_error_handler);
+     memset(cur_win, 0, sizeof(*cur_win));
+     cur_win->top_widget = XtVaAppInitialize(&cur_win->app_context,
+                                           xvile_class,
+@@ -2269,7 +2269,7 @@ x_preparse_args(int *pargc, char ***pargv)
+                                           Nval(XtNgeometry, NULL),
+                                           Nval(XtNinput, TRUE),
+                                           NULL);
+-    XtSetErrorHandler(runtime_error_handler);
++    XtSetErrorHandler((__attribute__((noreturn)) 
XtErrorHandler)runtime_error_handler);
+     dpy = XtDisplay(cur_win->top_widget);
+ 
+     XtVaGetValues(cur_win->top_widget,

diff --git a/app-editors/xvile/xvile-9.8w.ebuild 
b/app-editors/xvile/xvile-9.8w-r1.ebuild
similarity index 94%
rename from app-editors/xvile/xvile-9.8w.ebuild
rename to app-editors/xvile/xvile-9.8w-r1.ebuild
index 2d85fe5b7359..081a230fd55d 100644
--- a/app-editors/xvile/xvile-9.8w.ebuild
+++ b/app-editors/xvile/xvile-9.8w-r1.ebuild
@@ -29,6 +29,8 @@ DEPEND="${RDEPEND}
        sys-devel/flex"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=( "${FILESDIR}/${P}"-fix-build-for-clang16.patch )
+
 S="${WORKDIR}"/${MY_P}
 
 src_configure() {

Reply via email to