Skip to content

Commit 82276ef

Browse files
committed
cleanup: Fix GCC compatibility.
1 parent 24b5472 commit 82276ef

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.cirrus.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ bazel-opt_task:
99
- /src/workspace/tools/inject-repo c-toxcore
1010
test_all_script:
1111
- cd /src/workspace && bazel test -k
12-
--remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST
12+
--config=ci
1313
--build_tag_filters=-haskell
1414
--test_tag_filters=-haskell
15-
--remote_download_minimal
1615
--
1716
//c-toxcore/...
1817
-//c-toxcore/auto_tests:tcp_relay_test # TODO(robinlinden): Why does this pass locally but not in Cirrus?
@@ -27,10 +26,9 @@ bazel-dbg_task:
2726
- /src/workspace/tools/inject-repo c-toxcore
2827
test_all_script:
2928
- cd /src/workspace && bazel test -k
30-
--remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST
29+
--config=ci
3130
--build_tag_filters=-haskell
3231
--test_tag_filters=-haskell
33-
--remote_download_minimal
3432
--
3533
//c-toxcore/...
3634
-//c-toxcore/auto_tests:tcp_relay_test # TODO(robinlinden): Why does this pass locally but not in Cirrus?
@@ -45,7 +43,7 @@ cimple_task:
4543
- /src/workspace/tools/inject-repo c-toxcore
4644
test_all_script:
4745
- cd /src/workspace && bazel test -k
48-
--remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST
46+
--config=ci
4947
--build_tag_filters=haskell
5048
--test_tag_filters=haskell
5149
--

testing/fuzzing/fuzz_support.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
const bool DEBUG = false;
2424

25+
static constexpr tox_mono_time_cb *get_self_clock = ![](Fuzz_System *self) { return self->clock; };
26+
2527
// TODO(iphydf): Put this somewhere shared.
2628
struct Network_Addr {
2729
struct sockaddr_storage addr;
@@ -182,7 +184,7 @@ Fuzz_System::Fuzz_System(Fuzz_Data &input)
182184
}
183185
, data(input)
184186
{
185-
sys->mono_time_callback = ![](Fuzz_System *self) { return self->clock; };
187+
sys->mono_time_callback = get_self_clock;
186188
sys->mono_time_user_data = this;
187189
sys->mem = mem.get();
188190
sys->ns = ns.get();
@@ -269,7 +271,7 @@ Null_System::Null_System()
269271
std::make_unique<Random>(Random{&null_random_funcs, this}),
270272
}
271273
{
272-
sys->mono_time_callback = ![](Fuzz_System *self) { return self->clock; };
274+
sys->mono_time_callback = get_self_clock;
273275
sys->mono_time_user_data = this;
274276
sys->mem = mem.get();
275277
sys->ns = ns.get();
@@ -400,7 +402,7 @@ Record_System::Record_System(Global &global, uint64_t seed, const char *name)
400402
, seed_(seed)
401403
, name_(name)
402404
{
403-
sys->mono_time_callback = ![](Fuzz_System *self) { return self->clock; };
405+
sys->mono_time_callback = get_self_clock;
404406
sys->mono_time_user_data = this;
405407
sys->mem = mem.get();
406408
sys->ns = ns.get();

0 commit comments

Comments
 (0)