include the proper header for basename(), otherwise the returned pointer is truncated to 32 bit because an int return type is assumed
This is needed to build linux kernels on darwin. While we can’t actually use it to load kernel modules, we can use it to create indexes of modules on macOS. (cherry picked from commit ebb31480e8a45efbaff4c4a212bdfc0b053adde0)