From 64449b249a6e5aa726668c50f2f7f8eb969c3e29 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Sat, 29 Oct 2022 12:02:17 +0000 Subject: [PATCH] Adapt to aml api changes --- meson.build | 1 + src/main.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index ebdc6e5..d4ae9c4 100644 --- a/meson.build +++ b/meson.build @@ -16,6 +16,7 @@ prefix = get_option('prefix') c_args = [ '-D_GNU_SOURCE', + '-DAML_UNSTABLE_API=1', ] if buildtype != 'debug' and buildtype != 'debugoptimized' diff --git a/src/main.c b/src/main.c index c60b525..82b0688 100644 --- a/src/main.c +++ b/src/main.c @@ -809,7 +809,7 @@ static void create_canary_ticker(void) last_canary_tick = gettime_us(); struct aml* aml = aml_get_default(); - struct aml_ticker* ticker = aml_ticker_new(CANARY_TICK_PERIOD / 1000ULL, + struct aml_ticker* ticker = aml_ticker_new(CANARY_TICK_PERIOD, on_canary_tick, NULL, NULL); aml_start(aml, ticker); aml_unref(ticker); @@ -905,6 +905,11 @@ int main(int argc, char* argv[]) if (n_args >= 2) port = atoi(argv[optind + 1]); + if (aml_unstable_abi_version != AML_UNSTABLE_API) { + fprintf(stderr, "libaml is incompatible with current build of wlvncc!\n"); + abort(); + } + struct aml* aml = aml_new(); if (!aml) return 1;