summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2018-10-12 16:58:47 +1100
committerDarren Tucker <dtucker@dtucker.net>2018-10-12 16:58:47 +1100
commit797cdd9c8468ed1125ce60d590ae3f1397866af4 (patch)
treeea4e467425c7f809cd20a5d90fe95b34cd7b33e7
parente526127cbd2f8ad88fb41229df0c9b850c722830 (diff)
Don't avoid our *sprintf replacements.
Don't let systems with broken printf(3) avoid our replacements via asprintf(3)/vasprintf(3) calling libc internally. From djm@
-rw-r--r--openbsd-compat/bsd-asprintf.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/openbsd-compat/bsd-asprintf.c b/openbsd-compat/bsd-asprintf.c
index 822367154..109277271 100644
--- a/openbsd-compat/bsd-asprintf.c
+++ b/openbsd-compat/bsd-asprintf.c
@@ -19,6 +19,15 @@
19 19
20#include "includes.h" 20#include "includes.h"
21 21
22/*
23 * Don't let systems with broken printf(3) avoid our replacements
24 * via asprintf(3)/vasprintf(3) calling libc internally.
25 */
26#if defined(BROKEN_SNPRINTF)
27# undef HAVE_VASPRINTF
28# undef HAVE_ASPRINTF
29#endif
30
22#ifndef HAVE_VASPRINTF 31#ifndef HAVE_VASPRINTF
23 32
24#include <errno.h> 33#include <errno.h>