summaryrefslogtreecommitdiff
path: root/app-text/libspectre/files/libspectre-0.2.0-interix.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-text/libspectre/files/libspectre-0.2.0-interix.patch
reinit the tree, so we can have metadata
Diffstat (limited to 'app-text/libspectre/files/libspectre-0.2.0-interix.patch')
-rw-r--r--app-text/libspectre/files/libspectre-0.2.0-interix.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/app-text/libspectre/files/libspectre-0.2.0-interix.patch b/app-text/libspectre/files/libspectre-0.2.0-interix.patch
new file mode 100644
index 000000000000..7b607542dfad
--- /dev/null
+++ b/app-text/libspectre/files/libspectre-0.2.0-interix.patch
@@ -0,0 +1,29 @@
+diff -ru libspectre-0.2.0.orig/libspectre/spectre-utils.c libspectre-0.2.0/libspectre/spectre-utils.c
+--- libspectre-0.2.0.orig/libspectre/spectre-utils.c 2008-05-06 08:35:07 +0200
++++ libspectre-0.2.0/libspectre/spectre-utils.c 2008-05-06 08:49:51 +0200
+@@ -148,6 +148,17 @@
+ spectre_strdup_vprintf (const char *format,
+ va_list args)
+ {
++#ifdef __INTERIX
++ /* no [v]asprintf here, so we need to do something else. */
++ char * string = NULL;
++ char buf[524288];
++
++ if(vsprintf(buf, format, args) < 0)
++ return NULL;
++
++ string = strdup(buf);
++ return string;
++#else
+ char *string = NULL;
+ int len = vasprintf (&string, format, args);
+
+@@ -155,6 +166,7 @@
+ string = NULL;
+
+ return string;
++#endif
+ }
+
+ char *