summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/k5-buf.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/k5-buf.h b/src/include/k5-buf.h
index 2fe1d1d89..885c2fdc2 100644
--- a/src/include/k5-buf.h
+++ b/src/include/k5-buf.h
@@ -39,6 +39,7 @@
#define KRB5_CALLCONV_C
#endif
+#include <stdarg.h>
#include <string.h>
#include <unistd.h>
@@ -81,6 +82,13 @@ void krb5int_buf_add(struct k5buf *buf, const char *data);
output (use krb5int_buf_len to retrieve the length of the output). */
void krb5int_buf_add_len(struct k5buf *buf, const char *data, size_t len);
+/* Add sprintf-style formatted data to BUF. */
+void krb5int_buf_add_fmt(struct k5buf *buf, const char *fmt, ...)
+#if !defined(__cplusplus) && (__GNUC__ > 2)
+ __attribute__((__format__(__printf__, 2, 3)))
+#endif
+ ;
+
/* Truncate BUF. LEN must be between 0 and the existing buffer
length, or an assertion failure will result. */
void krb5int_buf_truncate(struct k5buf *buf, size_t len);