Re: kernel hacking

From: Terry Lambert (
Date: 07/08/03

  • Next message: Terry Lambert: "Re: 5 "Advanced" networking questions"
    Date: Tue, 08 Jul 2003 04:14:07 -0700
    To: Sandeep Kumar Davu <>

    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
    _______________________________________________ mailing list
    To unsubscribe, send any mail to ""

  • Next message: Terry Lambert: "Re: 5 "Advanced" networking questions"

    Relevant Pages

    • Re: Would I be violating the GPL?
      ... > Amongst the various arguments here for declaring a binary kernel ... And Microsoft's own attempts to license its header files, ... > of the author of the headers to distribute the resultant object code? ... Are you creating your source code based on somebody else's source code, ...
    • Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
      ... source code for the part of their Linux kernel images that provides ... the functionality "runs on Tivo DVRs". ... source code, which must be distributed under the terms of Sections 1 ... WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. ...
    • Re: Would I be violating the GPL?
      ... > A supplier of a PCI mezzanine digital IO card has provided a linux 2.4 ... > distributing the source code), or the proprietary source code license ... > as currently imposed by the supplier. ... I suspect all kernel modules are probably derivative works but I am not ...
    • Re: Embedded processor (and OS, tools) selection for long-life product
      ... This is industrial safety monitoring equipment that also has to meet some minimal radiation rating. ... The biggest change is to add an ethernet port which could be satisfied by some kind of separate serial to ethernet adaptor design as long as all the IP were available. ... The original system design used the Intel i960 running the Intel iRMK kernel. ... You need to make sure that you get the source code for the entire design as well as the source code for the entire toolchain. ...
    • Re: starting with 2.7
      ... >> You're effectively arguing that very little should happen. ... This must be considered relative to the size of the source code. ... as the kernel may then benefit from economies of scale. ... >> getting more peer review for patches, ...