summaryrefslogtreecommitdiff
path: root/dns/updatedd/files/patch-include-dprintf.h
diff options
context:
space:
mode:
authorGabor Kovesdan <gabor@FreeBSD.org>2007-02-28 20:05:21 +0000
committerGabor Kovesdan <gabor@FreeBSD.org>2007-02-28 20:05:21 +0000
commitca4027f02e9b33de2971d354e118a64d76eea783 (patch)
tree0475415396bfc25e3f99ee7ff8e9d4fc1660b6d3 /dns/updatedd/files/patch-include-dprintf.h
parentIt is no longer broke on amd64, which it builds now. (diff)
- Update to 2.6
- Update pkg-descr PR: ports/109297 Submitted by: David Sze <dsze@alumni.uwaterloo.ca> Approved by: Jason DiCioccio <jd@ods.org> (maintainer), erwin (mentor, implicit)
Diffstat (limited to 'dns/updatedd/files/patch-include-dprintf.h')
-rw-r--r--dns/updatedd/files/patch-include-dprintf.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/dns/updatedd/files/patch-include-dprintf.h b/dns/updatedd/files/patch-include-dprintf.h
new file mode 100644
index 000000000000..83ad7a099753
--- /dev/null
+++ b/dns/updatedd/files/patch-include-dprintf.h
@@ -0,0 +1,18 @@
+--- include/dprintf.h.orig Fri Sep 8 06:03:14 2006
++++ include/dprintf.h Mon Feb 19 16:00:43 2007
+@@ -40,13 +40,9 @@
+ va_list va;
+
+ va_start(va, fmt);
+- n = vsprintf(NULL, fmt, va);
+- if(n > MAXLEN)
++ n = vasprintf(&buffer, fmt, va);
++ if(-1 == n)
+ std_err(NONE, "dprintf() failed: string is too long");
+- if((buffer = (char *)malloc((n+1) * sizeof(char))) == NULL)
+- std_err(PERR, "malloc() failed");
+- (void)vsnprintf(buffer, n+1, fmt, va);
+- *(buffer+n) = '\0';
+ va_end(va);
+
+ if(write(s, buffer, n) == -1)