diff mbox series

[RFC,5/5] module: temporary hack to allow for no module dependencies

Message ID 20230630191812.2884637-6-prestwoj@gmail.com (mailing list archive)
State New
Headers show
Series Initial refactor for hwsim frame processing | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

James Prestwood June 30, 2023, 7:18 p.m. UTC
The module dependencies don't exist unless IWD_MODULE_DEPENDS
is used somewhere. For hwsim there is just a single module
(rules) so it will not compile. This needs a proper solution
but add a dummy dependency for now.
---
 src/module.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/src/module.c b/src/module.c
index f32190af..aee88bfb 100644
--- a/src/module.c
+++ b/src/module.c
@@ -120,6 +120,10 @@  int iwd_modules_init(void)
 		struct module *src;
 		struct module *dst;
 
+		if (!strcmp(dep->self, "dummy") &&
+				!strcmp(dep->target, "dummy"))
+			continue;
+
 		src = module_find(modules, n_modules, dep->self);
 		dst = module_find(modules, n_modules, dep->target);
 		if (!src || !dst) {
@@ -185,3 +189,5 @@  void iwd_modules_exit(void)
 	l_free(modules_sorted);
 	modules_sorted = NULL;
 }
+
+IWD_MODULE_DEPENDS(dummy, dummy);