X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <20110710132515.GO4726@calimero.vinschen.de> References: <20110710132515 DOT GO4726 AT calimero DOT vinschen DOT de> Date: Sun, 10 Jul 2011 21:49:58 +0200 Message-ID: Subject: Re: Where is gethostbyname2 ? From: Sam Mani To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id p6AJoLYv008265 OK, thanks. The local declaration works just fine :) On Sun, Jul 10, 2011 at 3:25 PM, Corinna Vinschen wrote: > On Jul 10 03:19, Sam Mani wrote: >> What header should a C file include to be able to call gethostbyname2() ? > > In theory that would be netdb.h, but apparently we forgot to declare > the function there and nobody missed it so far.  I applied a patch to > CVS so the declaration will be added to the next Cygwin release. > > For the time being, just declare the function in your source file, in > C++ for instance: > >  extern "C" struct hostent *gethostbyname2 (const char *, int); > -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple