mirror of
https://github.com/void-linux/void-packages.git
synced 2025-09-09 13:32:55 +02:00
okular: fix musl
This commit is contained in:
parent
056e3de7a3
commit
f2a9d72e42
1 changed files with 29 additions and 0 deletions
29
srcpkgs/okular/patches/musl-vasprintf.patch
Normal file
29
srcpkgs/okular/patches/musl-vasprintf.patch
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
--- core/synctex/synctex_parser.c 2017-12-05 23:07:10.000000000 +0100
|
||||||
|
+++ core/synctex/synctex_parser.c 2018-01-01 19:03:46.281593488 +0100
|
||||||
|
@@ -8188,6 +8188,26 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
+#if !defined(__GLIBC__)
|
||||||
|
+#include <stdio.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
+#include <stdarg.h>
|
||||||
|
+
|
||||||
|
+static int vasprintf(char **ret,
|
||||||
|
+ const char *format,
|
||||||
|
+ va_list ap)
|
||||||
|
+{
|
||||||
|
+ int len;
|
||||||
|
+ len = vsnprintf(NULL, 0, format, ap);
|
||||||
|
+ if (len < 0) return -1;
|
||||||
|
+ *ret = malloc(len + 1);
|
||||||
|
+ if (!*ret) return -1;
|
||||||
|
+ vsnprintf(*ret, len+1, format, ap);
|
||||||
|
+ (*ret)[len] = '\0';
|
||||||
|
+ return len;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gzvprintf is not available until OSX 10.10
|
Loading…
Add table
Reference in a new issue