[Android Software/Hacking General [Developers Only]] dylanmurzello:
I got an error while compiling the kernel ,tried changing toolchains too.

When I enable rndis and qcrndis I get an error ,after disabling it the kernel compiles successfully .

/home/ubuntu/Downloads/kali-nethunter-kernel/kali-nethunter-kernel/samsung/drivers/usb/gadget/function/rndis.c:46:1: error: use of undeclared identifier 'KBUILD_MODNAME'

module_param(rndis_ul_max_pkt_per_xfer_rcvd, int, S_IRUGO);

^

/home/ubuntu/Downloads/kali-nethunter-kernel/kali-nethunter-kernel/samsung/include/linux/moduleparam.h:126:2: note: expanded from macro 'module_param'

module_param_named(name, name, type, perm)

^

/home/ubuntu/Downloads/kali-nethunter-kernel/kali-nethunter-kernel/samsung/include/linux/moduleparam.h:147:2: note: expanded from macro 'module_param_named'

module_param_cb(name, &param_ops_##type, &value, perm);

^

/home/ubuntu/Downloads/kali-nethunter-kernel/kali-nethunter-kernel/samsung/include/linux/moduleparam.h:167:22: note: expanded from macro 'module_param_cb'

_module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0)

^

/home/ubuntu/Downloads/kali-nethunter-kernel/kali-nethunter-kernel/samsung/include/linux/moduleparam.h:13:29: note: expanded from macro 'MODULE_PARAM_PREFIX'

#define MODULE_PARAM_PREFIX KBUILD_MODNAME "."

^

/home/ubuntu/Downloads/kali-nethunter-kernel/kali-nethunter-kernel/samsung/drivers/usb/gadget/function/rndis.c:46:1: error: expected ';' after top level declarator

/home/ubuntu/Downloads/kali-nethunter-kernel/kali-nethunter-kernel/samsung/include/linux/moduleparam.h:126:2: note: expanded from macro 'module_param'

module_param_named(name, name, type, perm)

^

/home/ubuntu/Downloads/kali-nethunter-kernel/kali-nethunter-kernel/samsung/include/linux/moduleparam.h:147:2: note: expanded from macro 'module_param_named'

module_param_cb(name, &param_ops##type, &value, perm);

^

/home/ubuntu/Downloads/kali-nethunter-kernel/kali-nethunter-kernel/samsung/include/linux/moduleparam.h:167:22: note: expanded from macro 'module_param_cb'

_module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0)

^

/home/ubuntu/Downloads/kali-nethunter-kernel/kali-nethunter-kernel/samsung/include/linux/moduleparam.h:13:44: note: expanded from macro 'MODULE_PARAM_PREFIX'

#define MODULE_PARAM_PREFIX KBUILD_MODNAME "."

^

/home/ubuntu/Downloads/kali-nethunter-kernel/kali-nethunter-kernel/samsung/drivers/usb/gadget/function/rndis.c:51:1: error: use of undeclared identifier 'KBUILD_MODNAME'

module_param(rndis_ul_max_xfer_size_rcvd, int, S_IRUGO);

^

/home/ubuntu/Downloads/kali-nethunter-kernel/kali-nethunter-kernel/samsung/include/linux/moduleparam.h:126:2: note: expanded from macro 'module_param'

module_param_named(name, name, type, perm)

^

/home/ubuntu/Downloads/kali-nethunter-kernel/kali-nethunter-kernel/samsung/include/linux/moduleparam.h:147:2: note: expanded from macro 'module_param_named'

module_param_cb(name, &param_ops##type, &value, perm);

^

/home/ubuntu/Downloads/kali-nethunter-kernel/kali-nethunter-kernel/samsung/include/linux/moduleparam.h:167:22: note: expanded from macro 'module_param_cb'

_module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0)

^

/home/ubuntu/Downloads/kali-nethunter-kernel/kali-nethunter-kernel/samsung/include/linux/moduleparam.h:13:29: note: expanded from macro 'MODULE_PARAM_PREFIX'

#define MODULE_PARAM_PREFIX KBUILD_MODNAME "."

^

/home/ubuntu/Downloads/kali-nethunter-kernel/kali-nethunter-kernel/samsung/drivers/usb/gadget/function/rndis.c:51:1: error: expected ';' after top level declarator

/home/ubuntu/Downloads/kali-nethunter-kernel/kali-nethunter-kernel/samsung/include/linux/moduleparam.h:126:2: note: expanded from macro 'module_param'

module_param_named(name, name, type, perm)

^

/home/ubuntu/Downloads/kali-nethunter-kernel/kali-nethunter-kernel/samsung/include/linux/moduleparam.h:147:2: note: expanded from macro 'module_param_named'

module_param_cb(name, &param_ops##type, &value, perm);

^

/home/ubuntu/Downloads/kali-nethunter-kernel/kali-nethunter-kernel/samsung/include/linux/moduleparam.h:167:22: note: expanded from macro 'module_param_cb'

__module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1, 0)

^

/home/ubuntu/Downloads/kali-nethunter-kernel/kali-nethunter-kernel/samsung/include/linux/moduleparam.h:13:44: note: expanded from macro 'MODULE_PARAM_PREFIX'

#define MODULE_PARAM_PREFIX KBUILD_MODNAME "."