Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup: Fix GCC compatibility. #2413

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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; };
iphydf marked this conversation as resolved.
Show resolved Hide resolved

// 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
Loading