include config.h, as we are using autoconfed HAVE_ defines here
diff --git a/src/util.c b/src/util.c
index b1e1b77..902c198 100644
--- a/src/util.c
+++ b/src/util.c
@@ -34,6 +34,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <string.h>
+#include "config.h"
 #include "libmtp.h"
 #include "util.h"