--- a/src/utils/pathut.cpp
+++ b/src/utils/pathut.cpp
@@ -21,6 +21,7 @@
 #ifndef TEST_PATHUT
 #include "autoconfig.h"
 
+#include <stdio.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/param.h>