Re: Redhat-devel-list digest, Vol 1 #800 - 4 msgs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Jiangbo wrote:

>Hi, all,
>
>	Would you please have a look to the following code for me? This code has no compile error, but it will get an error message "unresolved symbol sys_semctl". I don't know why.
>  
>
>/* gcc -c -Wall test.c*/ 
>  
>  
>#define __KERNEL__ 
> #define MODULE 
>  
> #include <linux/module.h> 
> #include <linux/kernel.h> 
>  
>#include <linux/string.h> 
>#include <linux/types.h> 
>#include <linux/ipc.h> 
>#include <linux/sem.h> 
>#include <linux/slab.h> /*kmalloc(), kfree()*/ 
>#include <linux/stat.h> 
>  
>#include <asm/types.h> 
>#include <asm/ipc.h> 
>#include <asm/uaccess.h> 
>#include <asm/semaphore.h> 
>

What was the comman that caused the problem?

John posted results, but needed to add a -I to get the correct headers.

The commented line above is not enough either.

this worked fine though:
gcc -Wall -c -I /lib/modules/`uname -r`/build/include test.c

if you don't want the current kernel, use the correct kernel tree
instead like:
-I/usr/src/linux-2.4.20/include

-Thomas



_______________________________________________
Redhat-devel-list mailing list
Redhat-devel-list@redhat.com
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

[Index of Archives]     [Kernel Newbies]     [Red Hat General]     [Fedora]     [Red Hat Install]     [Linux Kernel Development]     [Yosemite News]

  Powered by Linux