Skip to content

Commit fcd0110

Browse files
Yang Erfacebook-github-bot
authored andcommitted
add preprocessor flag FOLLY_ATTR_WEAK_SYMBOLS_COMPILE_TIME for folly::flock
Summary: add preprocessor flag FOLLY_ATTR_WEAK_SYMBOLS_COMPILE_TIME for folly::flock Reviewed By: Orvid Differential Revision: D69881666 fbshipit-source-id: 5ac2f3b99b346eca7cb7531ddf8a994e7ae88b24
1 parent 18201e8 commit fcd0110

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

folly/portability/BUCK

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ cpp_library(
314314
compiler_flags = roar_no_jit(),
315315
deps = [
316316
":windows",
317+
"//folly:c_portability",
317318
],
318319
)
319320

folly/portability/SysFile.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@
1919
#ifdef _WIN32
2020
#include <limits>
2121

22+
#include <folly/CPortability.h>
2223
#include <folly/portability/Windows.h>
2324

24-
extern "C" int flock(int fd, int operation) {
25+
extern "C" int FOLLY_ATTR_WEAK_SYMBOLS_COMPILE_TIME
26+
flock(int fd, int operation) {
2527
HANDLE h = (HANDLE)_get_osfhandle(fd);
2628
if (h == INVALID_HANDLE_VALUE) {
2729
return -1;

0 commit comments

Comments
 (0)