Re: Which header should I include if I use function close() and inet_ntoa() in C

From: Erik de Castro Lopo (nospam_at_mega-nerd.com)
Date: 09/29/04


Date: Wed, 29 Sep 2004 22:15:53 +1000

learning_C++ wrote:
>
> Hi,
> Which header should I include if I use function close() and
> inet_ntoa()in C? Since now there is a warning:
>
> warning: implicit declaration of function `close'

    man 2 close

tells me <unistd.h>

> warning: implicit declaration of function `inet_ntoa'

    man inet_ntoa

tells me:
       #include <sys/socket.h>
       #include <netinet/in.h>
       #include <arpa/inet.h>

Erik

-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo  nospam@mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
"I have long argued that the entertainment industry doesn't want
people to have computers. Computers give users too much capability,
too much flexibility, too much freedom. The entertainment industry
wants users to sit back and consume things. They are trying to
turn a computer into an Internet Entertainment Platform, along the
lines of a television or VCR. This bill is a large step in that
direction."  -- Bruce Schneier


Relevant Pages

  • Re: Strange source code control system requirements
    ... "Erik de Castro Lopo" wrote in message ... > Norm Dresner wrote: ... >> I'm pretty sure that none of the conventional source configuration ... One of the development computers is in a classified, ...
    (comp.os.linux.development.apps)
  • Re: Are decimal literals in the linux source?
    ... > Decimal is ugly when dealing with computers. ... The linux source must ... Erik de Castro Lopo nospam@mega-nerd.com ...
    (alt.linux)
  • lost my c key in X
    ... computers are taking over the entertainment industry ... machine speaker to beep. ... ::': proud Debian developer, admin, and user ...
    (Debian-User)
  • Re: [9fans] sad commentary
    ... corporate users probably use computers in the performance of their ... jobs, but the fact is that the majority of the pc's -- and indeed all ...
    (comp.os.plan9)
  • Re: lost my c key in X
    ... computers are taking over the entertainment industry ... > remotely and just today tried to use it locally for the first time ... > machine speaker to beep. ...
    (Debian-User)