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: Fri, 23 Mar 2007 23:10:37 -0400

James K. Lowden wrote:
> I'm going to think about that, and do some research about the standards.
>
> It seems like we're missing something, especially because lots of other
> people have built FreeTDS on Solaris.

OK, I didn't work that hard. Yet, anyway.

Near the top of tds.h, add:

#if HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif /* HAVE_ARPA_INET_H */

I would put it after any system includes and before any local ones. In
CVS HEAD, that would be on line 28, after <time.h>, .

That's a correct fix, because tds.h uses struct in_addr but doesn't
include the file that defines it. In most of our .c files, we include the
headers anyway, so tds.h has what it needs when it's compiled. But
dblib/bcp.c seems to be an exception.

(Of course configure should have defined HAVE_ARPA_INET_H in your
config.h.)

Worth a try, anyway.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page