Add missing include for flock()
authorSara Golemon <sgolemon@fb.com>
Wed, 1 Jul 2015 16:00:48 +0000 (09:00 -0700)
committerSara Golemon <sgolemon@fb.com>
Wed, 1 Jul 2015 23:24:51 +0000 (16:24 -0700)
Summary: flock() expects sys/file.h which on many platforms
is getting included as a side-effect, but on at least one
this isn't the case.

Add the explicit include to fix builds on those platforms.

Closes #232

Facebook

Unrelated runtime failures.

Reviewed By: @JoelMarcey

Differential Revision: D2196306

folly/File.cpp

index 379efe62eb0c650c5d06b82650635594240f4e1d..253d005472a0a80f52c5bb67452071d0b9538c69 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <fcntl.h>
 #include <unistd.h>
+#include <sys/file.h>
 
 #include <folly/Exception.h>
 #include <folly/FileUtil.h>