The _init(9E), _info(9E), _fini(9E), and mod_install(9F) functions require you to include the modctl.h header file. The cmn_err(9F) function requires you to include the cmn_err.h header file, the ddi.h header file, and the sunddi.h header file.
The following header files are required by the three loadable module configuration routines that you have written in this section. Include this code near the top of your dummy.c file.
#include <sys/modctl.h> /* used by _init, _info, _fini */ #include <sys/cmn_err.h> /* used by all entry points for this driver */ #include <sys/ddi.h> /* used by all entry points for this driver */ #include <sys/sunddi.h> /* used by all entry points for this driver */