File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,24 @@ def install
38
38
ENV . cxx11
39
39
40
40
cd "folly" do
41
+ # Workaround for "no matching function for call to 'clock_gettime'"
42
+ # See upstream PR from 2 Oct 2016 facebook/folly#488
43
+ if DevelopmentTools . clang_build_version >= 800
44
+ inreplace [ "Benchmark.cpp" , "Benchmark.h" ] do |s |
45
+ s . gsub! "detail::DEFAULT_CLOCK_ID" ,
46
+ "(clockid_t)detail::DEFAULT_CLOCK_ID"
47
+ s . gsub! "clock_gettime(CLOCK_REALTIME" ,
48
+ "clock_gettime((clockid_t)CLOCK_REALTIME" , false
49
+ end
50
+ end
51
+
52
+ # Fix "candidate function not viable: no known conversion from
53
+ # 'folly::detail::Clock' to 'clockid_t' for 1st argument"
54
+ # See upstream PR mentioned above
55
+ if MacOS . version == "10.11" && MacOS ::Xcode . installed? && MacOS ::Xcode . version >= "8.0"
56
+ inreplace "portability/Time.h" , "typedef uint8_t clockid_t;" , ""
57
+ end
58
+
41
59
# Build system relies on pkg-config but gflags removed
42
60
# the .pc files so now folly cannot find without flags.
43
61
ENV [ "GFLAGS_CFLAGS" ] = Formula [ "gflags" ] . opt_include
You can’t perform that action at this time.
0 commit comments