From f27fbdfa53d6de802bbb4cc9cfbfdc3ddc7a4ded Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 27 Oct 2025 11:35:32 +1000 Subject: [PATCH] meson.build: change set10 to set Follow-up to cfec80582efc ("meson.build: change from config.set10() and #if to config.set() and #ifdef") which was parallel to 9e37bc0cfa4d and the latter didn't get updated. Fixes: 9e37bc0cfa4d ("plugins: add support for lua plugins to change evdev event streams") Part-of: --- meson.build | 8 ++++++-- src/libinput-plugin.c | 8 ++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 35d07552..39244f80 100644 --- a/meson.build +++ b/meson.build @@ -171,10 +171,14 @@ dep_rt = cc.find_library('rt', required : false) dep_lua = dependency(get_option('lua-interpreter'), required : get_option('lua-plugins')) have_lua = dep_lua.found() -config_h.set10('HAVE_LUA', have_lua) +if have_lua + config_h.set('HAVE_LUA', 1) +endif have_plugins = dep_lua.found() -config_h.set10('HAVE_PLUGINS', have_plugins) +if have_plugins + config_h.set('HAVE_PLUGINS', 1) +endif summary({ 'Plugins enabled' : have_plugins, diff --git a/src/libinput-plugin.c b/src/libinput-plugin.c index 81c45fe9..bee11732 100644 --- a/src/libinput-plugin.c +++ b/src/libinput-plugin.c @@ -382,7 +382,7 @@ libinput_plugin_system_load_plugins(struct libinput *libinput, return 0; } -#if HAVE_LUA +#ifdef HAVE_LUA _autostrvfree_ char **directories = steal(&libinput->plugin_system.directories); size_t nfiles = 0; _autostrvfree_ char **plugin_files = @@ -400,10 +400,10 @@ libinput_plugin_system_load_plugins(struct libinput *libinput, libinput_plugin_system_run(&libinput->plugin_system); -#if !HAVE_PLUGINS - return -ENOSYS; -#else +#ifdef HAVE_PLUGINS return 0; +#else + return -ENOSYS; #endif }