okular: fix musl
This commit is contained in:
parent
056e3de7a3
commit
f2a9d72e42
|
@ -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…
Reference in New Issue