--- libbalsa/misc.c.orig	2015-05-31 10:17:19.494312782 +0200
+++ libbalsa/misc.c	2015-05-31 10:17:27.054393821 +0200
@@ -34,6 +34,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <fcntl.h>
 #include <sys/file.h>
 #include <sys/stat.h>
 #include <sys/types.h>
