Fwd: My simple kernel module wont compile

Bruno Guedes Souto brunoguedes at gmail.com
Fri Sep 12 14:29:56 EDT 2014


testlaster <testlaster <at> gmail.com> writes:

> 
> 
>     Yes I did run sudo apt-get install build-essential
>     linux-headers-$(uname -r) to download the necessary headers. I also
>     ran an apt-get for source files and it did install a whole bunch of
>     them but Im not under the impression that you actually need the
>     source files as well since they suppose to come with the OS?

No, many distributions don't come with the source files. 

>     The thing its complaining about... unistd_32.h appears to really be
>     missing. Could this be because of a 64Bit version of the OS? 

No, I've ran your code last night on a 64bit machine of mine and beside some 
compiling errors due to wrong syntax and function declaration it was all 
fine.

>     Maybes
>     just doesnt install it because its not necessary. But that wouldnt
>     make sense because in unistd.h the only include there is will be the
>     unistd_32.h and nowhere inside stands anything of
>     #include<unistd_64.h>

It seems to me, you are just missing the necessary tools from your 
distribution 
to do the kind of work you want to do. Try a google search on your distro
+ kernel development and you probably will find what you need. Usually what 
you
must get are the linux-source, kernel-devel and kernel-tools packages.

Regards

Bruno Guedes Souto




More information about the Kernelnewbies mailing list