--- a/src/avro_generic_internal.h
+++ b/src/avro_generic_internal.h
@@ -28,6 +28,8 @@ extern "C" {
 #include "avro/schema.h"
 #include "avro/value.h"
 
+#include <stdio.h>
+
 /*
  * Each generic value implementation struct defines a couple of extra
  * methods that we use to control the lifecycle of the value objects.
