--- a/src/binwrap.cpp
+++ b/src/binwrap.cpp
@@ -18,6 +18,7 @@
  */
 
 #include "binwrap.h"
+#include <cstdio>
 
 #if BINIO_ENABLE_IOSTREAM