Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jul 2011 20:30:00 +0200
From:      Polytropon <freebsd@edvax.de>
To:        ahmad javadi <seyyedahmad.javadi@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: the alternative function for inet_aton
Message-ID:  <20110704203000.c5b9f30f.freebsd@edvax.de>
In-Reply-To: <CAARzWpWALGht=SCQmoA9=T_bW9Bz0BGOULV8fQ3jfB5AA2C7KA@mail.gmail.com>
References:  <CAARzWpWALGht=SCQmoA9=T_bW9Bz0BGOULV8fQ3jfB5AA2C7KA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 4 Jul 2011 22:35:28 +0430, ahmad javadi wrote:
> hi
> I use " inet_aton"  function in the kernel socket programming but i have the
> following warrning:
> "crypto.c:63: warning: implicit declaration of function 'inet_aton'
> crypto.c:63: warning: nested extern declaration of  'inet_aton'
> "
> this function required that "<arpa/inet,h>" be included but this folder did
> not exit in the my freebsd.

Does the directory /usr/include/arpa _not_ exist, or just the
file inet.h in that directory? (If this is, your system include
files are incomplete.)

I also assume that "inet comma h" is a typo, and you've used
#include <arpa/inet.h> ("inet dot h") correctly. I also assume
you didn't modify the settings from where header files included
with #include <...> should be imported (cc -I).

Which FreeBSD version do you use? I'm using 7-STABLE here and
the file is present, it also contains the function prototype.

#define inet_aton               __inet_aton
int              inet_aton(const char *, struct in_addr *);

If you've installed the sources (at the correct version of the
OS you're using), you can find /usr/src/include/arpa with the
file, and you should be able to "make install" (not tested here)
from there to install arpa/inet.h into the correct location.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110704203000.c5b9f30f.freebsd>