diff options
-rw-r--r-- | source4/lib/replace/snprintf.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source4/lib/replace/snprintf.c b/source4/lib/replace/snprintf.c index 1ff3c1e324..93285a5e57 100644 --- a/source4/lib/replace/snprintf.c +++ b/source4/lib/replace/snprintf.c @@ -1209,6 +1209,27 @@ static int add_cnk_list_entry(struct pr_chunk_x **list, } #endif +#ifndef HAVE_C99_VSNPRINTF + int printf(const char *fmt, ...) +{ + va_list ap; + int ret; + char *s; + + s = NULL; + va_start(ap, fmt); + ret = vasprintf(&s, fmt, ap); + va_end(ap); + + if (s) { + fwrite(s, 1, strlen(s), stdout); + } + free(s); + + return ret; +} +#endif + #endif #ifndef HAVE_VASPRINTF |