[Techtalk] kernel hack question

Akkana Peck akkana at shallowsky.com
Sat Feb 7 10:28:28 EST 2004


Tracey Clark writes:
> And it was said by Tintin J de Belen-->
> > I create a simple system call and placed the needed files in the
> > appropriate directories; edited entry.S and unistd.
> >
> > but when I try to run gcc userapp.c, I get this error
> >
> > __NR_myservice' undeclared (first use in this function)
> > error: (Each undeclared identifier is reported only once
> > error: for each function it appears in.)
> 
> What the error is saying is that there is a call to a function or
> variable called __NR_myservice that is not defined. This means the
> variable or function was used without being declared in the program & set
> up according to the C specs.

More specifically: it's probably looking for a declaration of
__NR_myservice, which typically would be in a .h file somewhere.
Perhaps you need to set the include paths so that it finds the
.h file where you've declared the new functions?  If it's looking
in the standard kernel headers in /usr/include, then it won't find
your new function, and you might have to add a -I/path/to/new/headers
to the gcc line.

	...Akkana


More information about the Techtalk mailing list