diff options
Diffstat (limited to 'misc/subr.h')
| -rw-r--r-- | misc/subr.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/misc/subr.h b/misc/subr.h index 73465b0..cec7586 100644 --- a/misc/subr.h +++ b/misc/subr.h @@ -1,8 +1,9 @@ #ifndef BTPD_SUBR_H #define BTPD_SUBR_H -#include <stdio.h> #include <stdarg.h> +#include <stdio.h> +#include <stdint.h> #define max(x, y) ((x) >= (y) ? (x) : (y)) #define min(x, y) ((x) <= (y) ? (x) : (y)) @@ -47,4 +48,9 @@ void *read_file(const char *path, void *buf, size_t *size); char *find_btpd_dir(void); int make_abs_path(const char *in, char *out); +#ifndef HAVE_ASPRINTF +__attribute__((format (printf, 2, 3))) +int asprintf(char **strp, const char *fmt, ...); +#endif + #endif |