Skip to content

Commit

Permalink
cleanup: Fix GCC compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Nov 7, 2023
1 parent 24b5472 commit 82276ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 3 additions & 5 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ bazel-opt_task:
- /src/workspace/tools/inject-repo c-toxcore
test_all_script:
- cd /src/workspace && bazel test -k
--remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST
--config=ci
--build_tag_filters=-haskell
--test_tag_filters=-haskell
--remote_download_minimal
--
//c-toxcore/...
-//c-toxcore/auto_tests:tcp_relay_test # TODO(robinlinden): Why does this pass locally but not in Cirrus?
Expand All @@ -27,10 +26,9 @@ bazel-dbg_task:
- /src/workspace/tools/inject-repo c-toxcore
test_all_script:
- cd /src/workspace && bazel test -k
--remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST
--config=ci
--build_tag_filters=-haskell
--test_tag_filters=-haskell
--remote_download_minimal
--
//c-toxcore/...
-//c-toxcore/auto_tests:tcp_relay_test # TODO(robinlinden): Why does this pass locally but not in Cirrus?
Expand All @@ -45,7 +43,7 @@ cimple_task:
- /src/workspace/tools/inject-repo c-toxcore
test_all_script:
- cd /src/workspace && bazel test -k
--remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST
--config=ci
--build_tag_filters=haskell
--test_tag_filters=haskell
--
Expand Down
8 changes: 5 additions & 3 deletions testing/fuzzing/fuzz_support.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

const bool DEBUG = false;

static constexpr tox_mono_time_cb *get_self_clock = ![](Fuzz_System *self) { return self->clock; };

// TODO(iphydf): Put this somewhere shared.
struct Network_Addr {
struct sockaddr_storage addr;
Expand Down Expand Up @@ -182,7 +184,7 @@ Fuzz_System::Fuzz_System(Fuzz_Data &input)
}
, data(input)
{
sys->mono_time_callback = ![](Fuzz_System *self) { return self->clock; };
sys->mono_time_callback = get_self_clock;
sys->mono_time_user_data = this;
sys->mem = mem.get();
sys->ns = ns.get();
Expand Down Expand Up @@ -269,7 +271,7 @@ Null_System::Null_System()
std::make_unique<Random>(Random{&null_random_funcs, this}),
}
{
sys->mono_time_callback = ![](Fuzz_System *self) { return self->clock; };
sys->mono_time_callback = get_self_clock;
sys->mono_time_user_data = this;
sys->mem = mem.get();
sys->ns = ns.get();
Expand Down Expand Up @@ -400,7 +402,7 @@ Record_System::Record_System(Global &global, uint64_t seed, const char *name)
, seed_(seed)
, name_(name)
{
sys->mono_time_callback = ![](Fuzz_System *self) { return self->clock; };
sys->mono_time_callback = get_self_clock;
sys->mono_time_user_data = this;
sys->mem = mem.get();
sys->ns = ns.get();
Expand Down

0 comments on commit 82276ef

Please sign in to comment.