From 8b485b79bed3ae1f9bb0ae41c030c09d85065d09 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 7 Nov 2023 17:09:16 +0100 Subject: [PATCH] Make use of MODULE_IMPORT_NS conditional Commit 8954f2b8d8a06db44bef9a1318f6e1cdb001b98d added an unconditional: MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver); For compatibility with old kernel versions, guard this declaration with #ifdef MODULE_IMPORT_NS. This specific symbol namespace is also Android-specific, so the declaration should also be conditional on building for Android, but there doesn't seem to be a single preprocessor symbol that indicates that. Signed-off-by: Ben Hutchings --- os_dep/linux/usb_intf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/os_dep/linux/usb_intf.c b/os_dep/linux/usb_intf.c index 2ef96b3..be0f654 100644 --- a/os_dep/linux/usb_intf.c +++ b/os_dep/linux/usb_intf.c @@ -1640,7 +1640,9 @@ static void __exit rtw_drv_halt(void) rtw_mstat_dump(RTW_DBGDUMP); } +#ifdef MODULE_IMPORT_NS MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver); +#endif module_init(rtw_drv_entry); module_exit(rtw_drv_halt);