Просмотр исходного кода

libcompat: Add declarations in compat.h for snprintf functions

Guillem Jover лет назад: 16
Родитель
Сommit
ab91f03850
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      lib/compat/compat.h

+ 8 - 0
lib/compat/compat.h

@@ -49,6 +49,14 @@ extern "C" {
 
 #include <strnlen.h>
 
+#ifndef HAVE_C99_SNPRINTF
+#include <stddef.h>
+#include <stdarg.h>
+
+int snprintf(char *str, size_t n, char const *fmt, ...);
+int vsnprintf(char *buf, size_t maxsize, const char *fmt, va_list args)
+#endif
+
 #ifndef HAVE_ASPRINTF
 #include <stdarg.h>