diff --git a/src/common/lockfile.cc b/src/common/lockfile.cc
index 209beab..d6ca234 100644
--- a/src/common/lockfile.cc
+++ b/src/common/lockfile.cc
@@ -1,6 +1,7 @@
 #include "common/platform.h"
 #include "common/lockfile.h"
 
+#include <fcntl.h>
 #include <unistd.h>
 #include <sys/file.h>
 #include <sys/types.h>
