#include <folly/File.h>
-#include <fcntl.h>
#include <unistd.h>
#include <folly/Exception.h>
#include <folly/FileUtil.h>
#include <folly/Format.h>
#include <folly/ScopeGuard.h>
+#include <folly/portability/Fcntl.h>
#include <folly/portability/SysFile.h>
#include <system_error>
#include <folly/FileUtil.h>
#include <cerrno>
-#ifdef __APPLE__
-#include <fcntl.h>
-#endif
#include <sys/socket.h>
#include <folly/detail/FileUtilDetail.h>
+#include <folly/portability/Fcntl.h>
#include <folly/portability/SysFile.h>
namespace folly {
#include <folly/detail/SocketFastOpen.h>
#include <folly/io/async/EventBase.h>
#include <folly/io/async/NotificationQueue.h>
+#include <folly/portability/Fcntl.h>
#include <errno.h>
-#include <fcntl.h>
#include <netinet/tcp.h>
#include <string.h>
#include <sys/socket.h>
#include <folly/io/async/EventHandler.h>
#include <folly/SocketAddress.h>
#include <folly/io/IOBuf.h>
+#include <folly/portability/Fcntl.h>
#include <folly/portability/SysUio.h>
#include <poll.h>
#include <limits.h>
#include <unistd.h>
#include <thread>
-#include <fcntl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <folly/io/async/EventBase.h>
#include <folly/Likely.h>
+#include <folly/portability/Fcntl.h>
#include <errno.h>
#include <unistd.h>
-#include <fcntl.h>
// Due to the way kernel headers are included, this may or may not be defined.
// Number pulled from 3.10 kernel headers.
#pragma once
-#include <fcntl.h>
#include <poll.h>
#include <sys/types.h>
#include <unistd.h>
#include <folly/Likely.h>
#include <folly/ScopeGuard.h>
#include <folly/SpinLock.h>
+#include <folly/portability/Fcntl.h>
#include <glog/logging.h>