summaryrefslogtreecommitdiff
path: root/devel/elfutils/files/patch-lib_vasnprintf.h
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2016-07-13 17:48:54 +0000
committerConrad Meyer <cem@FreeBSD.org>2016-07-13 17:48:54 +0000
commit552479055ed8ad7f7ffca61077c088b9c70dca75 (patch)
treeab51fff0d12ebcaa9f5ecac4eccad04a060ba2a6 /devel/elfutils/files/patch-lib_vasnprintf.h
parentActually remove needless patch. (diff)
Add elfutils 0.163
Elfutils is a collection of utilities, including: stack (to show backtraces); nm (for listing symbols from object files); size (for listing the section sizes of an object or archive file); strip (for discarding symbols); readelf (to see the raw ELF file structures); elflint (to check for well-formed ELF files); and elfcompress (to compress or decompress ELF sections). It also provides libraries to allow other programs to manipulate ELF and DWARF data. WWW: https://fedorahosted.org/elfutils/ Reviewed by: bdrewery Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D7206
Diffstat (limited to 'devel/elfutils/files/patch-lib_vasnprintf.h')
-rw-r--r--devel/elfutils/files/patch-lib_vasnprintf.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/devel/elfutils/files/patch-lib_vasnprintf.h b/devel/elfutils/files/patch-lib_vasnprintf.h
new file mode 100644
index 000000000000..6bbc1784b621
--- /dev/null
+++ b/devel/elfutils/files/patch-lib_vasnprintf.h
@@ -0,0 +1,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);
++}