Can anyone please help me with getting the proper header files needed for the copy_from_user method?
I found a few of the include headers I need, but my compiler keeps saying that they are not found. I am running CentOS on my machine. I have tried yum installing various kernel-headers and devel packages but still no luck.
Is there a special segment I need to add in my gcc command? Everything I find on the Internet only tells me how to use the method but not actually how I can get access to it in the first place.
I assume you’re developing a kernel module, because outside of it trying to use
copy_from_userwouldn’t make sense. Either way, in the kernel use:Edit: if building a kernel module is what you want, you may want to look at this Hello World Linux Kernel Module. Specifically the makefile portion may be of interest to you (search for
obj-m).