I would like to define a macro for my kernel module by using the -D flag, but I can’t figure out how to do it in a custom loadable kernel module. Just to be clear, to set the macro TEST to 1 I usually do something like: cc -D TEST=1 file.c -o file And inside the file.c I have Now,