aboutsummaryrefslogtreecommitdiffstats
path: root/devel/elfutils/files/patch-lib_vasnprintf.h
blob: 6bbc1784b62100b1c8c4a10e4524e08957cc6e5b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- lib/vasnprintf.h.orig   2016-07-13 08:19:27 UTC
+++ lib/vasnprintf.h
@@ -0,0 +1,23 @@
+#pragma once
+#include <stdarg.h>
+#include <stdio.h>
+
+static inline char *
+vasnprintf(char *resultbuf, size_t *lengthp, const char *format, va_list args)
+{
+   char *alloc;
+   int len;
+
+   len = vasprintf(&alloc, format, args);
+   if (len < 0)
+       return (NULL);
+
+   *lengthp = len;
+
+   if (resultbuf != NULL && (size_t)len < *lengthp) {
+       memcpy(resultbuf, alloc, len + 1);
+       free(alloc);
+       return (resultbuf);
+   }
+   return (alloc);
+}
e/log/mail/nullmailer/Makefile?h=mate-1.20&id=572185ee6afe257e4ff9796c184f175a3aec5b37&showmsg=1'>Expand)AuthorAgeFilesLines * mail/nullmailer: support stagewg2014-07-291-12/+3 * - Replace security/gnutls with security/gnutls3 and update to 3.2.15tijl2014-07-231-0/+1 * Fix some non default LIB_DEPENDSbapt2014-07-16