Sandeep Kumar Davu wrote:
> I was making changes to 4.5 source code. I tried to recompile the kernel.
> it compiles well but is not able to link it.
> I used the function inet_aton in uipc_socket.c
> This is the error i got.
> 
> uipc_socket.o(.text+0xid8): undefined refernce to '__inet_aton'
> 
> I added all the header files that were required.
> 
> Can anyone tell what is missing.

You are trying to call a libc function from within the kernel.

In general, you can not use /usr/include headers in kernel
code, only /usr/include/sys headers.  This is because the
kernel is not linked againsts libc.

Mostly, you should not be dealing with strings in the kernel;
if you are adding a kernel entry point to be called from user
space, you should convert the address into a sockaddr_in
before you pass it into the kernel, instead.

-- Terry
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to