Skip to content

Commit

Permalink
kde-apps/okular: Fix musl build (implicit vasprintf decl)
Browse files Browse the repository at this point in the history
  • Loading branch information
a17r committed Sep 10, 2024
1 parent 4954f9a commit 4890f99
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
29 changes: 29 additions & 0 deletions kde-apps/okular/files/okular-23.08.5-implicit-vasprintf.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From a0f57bf7f984289c5b0ceefa2a784f97cd58428a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Germ=C3=A1n=20Poo-Caama=C3=B1o?= <[email protected]>
Date: Sat, 30 May 2020 16:15:27 -0400
Subject: [PATCH] Fix implicit declaration of vasprintf

Fix build when compiling with `-Werror=implicit-function-declaration`.
---
core/synctex/synctex_parser.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/core/synctex/synctex_parser.c b/core/synctex/synctex_parser.c
index 9eed566b3..a67006d39 100644
--- a/core/synctex/synctex_parser.c
+++ b/core/synctex/synctex_parser.c
@@ -55,6 +55,11 @@
* First level objects are sheets and forms, containing boxes, glues, kerns...
* The third tree allows to browse leaves according to tag and line.
*/
+/* Declare _GNU_SOURCE for accessing vasprintf. For MSC compiler, vasprintf is
+ * defined in this file
+ */
+#define _GNU_SOURCE
+
#if defined(SYNCTEX_USE_LOCAL_HEADER)
#include "synctex_parser_local.h"
#else
--
2.44.0

1 change: 1 addition & 0 deletions kde-apps/okular/okular-24.08.49.9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ RDEPEND="${DEPEND}
PATCHES=(
"${FILESDIR}/${PN}-24.04.80-tests.patch" # bug 734138
"${FILESDIR}/${PN}-20.08.2-hide-mobile-app.patch" # avoid same-name entry
"${FILESDIR}/${PN}-23.08.5-implicit-vasprintf.patch" # bug 922345; pending upstream
)

src_configure() {
Expand Down
1 change: 1 addition & 0 deletions kde-apps/okular/okular-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ RDEPEND="${DEPEND}
PATCHES=(
"${FILESDIR}/${PN}-24.04.80-tests.patch" # bug 734138
"${FILESDIR}/${PN}-20.08.2-hide-mobile-app.patch" # avoid same-name entry
"${FILESDIR}/${PN}-23.08.5-implicit-vasprintf.patch" # bug 922345; pending upstream
)

src_configure() {
Expand Down

0 comments on commit 4890f99

Please sign in to comment.