Skip to Content.
Sympa Menu

freetds - Re: [freetds] solaris compile warning on struct in_addr

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] solaris compile warning on struct in_addr
  • Date: Mon, 26 Mar 2007 23:36:46 -0400

Reid, Roger L. wrote:
> > From: James K. Lowden [mailto:jklowden AT freetds.org]
> > Subject: Re: [freetds] solaris compile warning on struct in_addr
> >
> > James K. Lowden wrote:
> > Near the top of tds.h, add:
> >
> > #if HAVE_ARPA_INET_H
> > #include <arpa/inet.h>
> > #endif /* HAVE_ARPA_INET_H */
>
> Yes, that works.

Good. That's what I expected. tds.h uses struct in_addr; best practice
is to include the file that defines it. Maybe others have ignored or not
noticed the message. It probably *works* anyway because C has fallback
rules for interpreting arguments in the absence of prototypes. Thanks for
reporting it and sticking with the program.

> > (Of course configure should have defined HAVE_ARPA_INET_H in your
> > config.h.)
>
> the odd thing - it *is* defined in config.h

It's not really odd. The configure script found your file and it *is*
there, so configure did its job. If it hadn't done its job,
HAVE_ARPA_INET_H would be false and the file wouldn't be included, solving
nothing (and furthering the mystery).

The mistake was to use a system-defined structure without including the
file that defines it. Simple like that. :-)

Regards,

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page