"expected specifier-qualifier-list" ERROR while adding a new system call

1 view
Skip to first unread message

Irfan Ahmed

unread,
Apr 30, 2007, 12:12:24 AM4/30/07
to kernel...@nl.linux.org
Hi,

I have tried to add  a new system call. I am using Fedora linux 6 ..Kernel 2.6.18.2
I followed the document http://nd.edu/~ablaich/system_call_implementation_a_blaich.txt to add a new system call.

During compilation I got the following error. I have place my system call code in ~/ipc/ which is also as follows. Does any body has idea about this error.
___________________________________________________________
In file included from include/linux/shm.h:4,
                 from ipc/mycall.c:2:
include/linux/ipc.h:59: error: expected specifier-qualifier-list before ‘spinlock_t’
ipc/mycall.c:3:21: error: inttypes.h: No such file or directory
make[1]: *** [ipc/mycall.o] Error 1
make: *** [ipc] Error 2
__________________________________________________________________

/*System call code*/

#include<linux/linkage.h>
#include<linux/shm.h>
#include<linux/types.h>


asmlinkage long sys_mycall(int i)
{
return i+10;
}_____________________________________________

Send instant messages to your online friends http://uk.messenger.yahoo.com

Randy Dunlap

unread,
Apr 30, 2007, 10:59:03 AM4/30/07
to Irfan Ahmed, kernel...@nl.linux.org
On Sun, 29 Apr 2007 21:12:24 -0700 (PDT) Irfan Ahmed wrote:

> Hi,
>
> I have tried to add a new system call. I am using Fedora linux 6 ..Kernel 2.6.18.2
> I followed the document http://nd.edu/~ablaich/system_call_implementation_a_blaich.txt to add a new system call.
>
> During compilation I got the following error. I have place my system call code in ~/ipc/ which is also as follows. Does any body has idea about this error.
> ___________________________________________________________
> In file included from include/linux/shm.h:4,
> from ipc/mycall.c:2:
> include/linux/ipc.h:59: error: expected specifier-qualifier-list before ‘spinlock_t’
> ipc/mycall.c:3:21: error: inttypes.h: No such file or directory

Looks like Makefile problems. How did you try to make/build this?


> make[1]: *** [ipc/mycall.o] Error 1
> make: *** [ipc] Error 2
> __________________________________________________________________
>
> /*System call code*/
>
> #include<linux/linkage.h>
> #include<linux/shm.h>
> #include<linux/types.h>
>
>
> asmlinkage long sys_mycall(int i)
> {
> return i+10;
> }

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to eca...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply all
Reply to author
Forward
0 new messages