From owner-freebsd-questions@FreeBSD.ORG Mon Jul 4 18:30:03 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B59CA106566B for ; Mon, 4 Jul 2011 18:30:03 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 7475C8FC12 for ; Mon, 4 Jul 2011 18:30:03 +0000 (UTC) Received: from r55.edvax.de (port-92-195-180-180.dynamic.qsc.de [92.195.180.180]) by mx01.qsc.de (Postfix) with ESMTP id 145D93D04B; Mon, 4 Jul 2011 20:30:01 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id p64IU0QK006613; Mon, 4 Jul 2011 20:30:01 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Mon, 4 Jul 2011 20:30:00 +0200 From: Polytropon To: ahmad javadi Message-Id: <20110704203000.c5b9f30f.freebsd@edvax.de> In-Reply-To: References: Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: the alternative function for inet_aton X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jul 2011 18:30:03 -0000 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 "" 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 ("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, ...