[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

resolv.h test proposal

From: Stepan Kasal
Subject: resolv.h test proposal
Date: Mon, 25 Oct 2004 14:14:39 +0200
User-agent: Mutt/1.4.1i

   the text below seems to relly be a bug report with a proposed fix.
So I take the liberty to forward it to the bug report address.

        Stepan Kasal

----- Forwarded message from "Gerrit P. Haase" -----

Date: Mon, 25 Oct 2004 13:46:43 +0200
From: "Gerrit P. Haase" <address@hidden>
To: address@hidden
Cc: address@hidden
Subject: Re: [bugreport] resolv.h test fails (was: Re: minires-devel-0.97-1:
        resolv.h fails)

Gerrit wrote:

> Pierre A. Humblet wrote:

>> At 01:03 PM 10/18/2004 +0200, Corinna Vinschen wrote:
>>>On Oct 18 03:28, Reini Urban wrote:
>>>>  #include <resolv.h> fails suddenly.
>>>>Apparently /usr/include/resolv.h misses the definition for
>>>>sockaddr_in, which is defined in <cygwin/in.h>
>>>>Have no clue why it suddenly fails. Anyone else?
>>>>These headers didn't change for years...
>>>>Which file is supposed to include cygwin/in.h? I found nothing.
>> Its an upstream issue. According to the resolver man page, 
>> netinet/in.h should be included before resolv.h.
>> For example
>> <>
>>      #include <sys/types.h>
>>      #include <netinet/in.h>
>>      #include <arpa/nameser.h>
>>      #include <resolv.h>

> I think this is correct.  What is buggy is the autoconf test which is
> just including resolv.h and not netinet/in.h to compile the test exe.

This applies to the default test when calling

Workaround is to use like this in

AC_CHECK_HEADERS([arpa/nameser.h netinet/in.h sys/socket.h sys/types.h])
AC_CHECK_HEADERS([resolv.h], [], [],
      [[#if HAVE_SYS_TYPES_H
        #  include <sys/types.h>
        #ifdef HAVE_NETINET_IN_H
        #  include <netinet/in.h>   /* inet_ functions / structs */
        #ifdef HAVE_ARPA_NAMESER_H
        #  include <arpa/nameser.h> /* DNS HEADER struct */
        #ifdef HAVE_SYS_SOCKET_H
        #  include <sys/socket.h> /* DNS HEADER struct */

Anyway, there should be a macro which provides this functionity.

----- End forwarded message -----

reply via email to

[Prev in Thread] Current Thread [Next in Thread]