--- a/src/vasprintf.c
+++ b/src/vasprintf.c
@@ -61,6 +61,7 @@ http://www.gnu.org/licenses/ or write to
 #endif /* HAVE_VA_COPY */
 
 #ifdef HAVE_WCHAR_H
+#include <stddef.h>
 #include <wchar.h>
 #endif
 
