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: "Lowden, James K" <james.k.lowden AT alliancebernstein.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] solaris compile warning on struct in_addr
  • Date: Tue, 20 Mar 2007 16:52:45 -0400

> From: Reid, Roger L.
> Sent: Tuesday, March 20, 2007 2:49 PM
>
> I'm compiling .64 the same way I did 60-63 -
> ./configure --prefix=/usr/local/app/FreeTDS --enable-sybase-compat
>
> but getting warnings about the struct in_addr parameter in the
> declaration in tds.h:
>
> #ifdef INADDR_NONE
> const char *tds_inet_ntoa_r(struct in_addr iaddr,
> char *ip, size_t len);
> #endif
...
> In file included from bcp.c:39:
> ../../include/tds.h:1244: warning: `struct in_addr' declared inside
parameter li
> st
> ../../include/tds.h:1244: warning: its scope is only this definition
or declarat
> ion, which is probably not what you want
> ../../include/tds.h:1244: warning: parameter has incomplete type

You might try adding:

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

to bcp.c. And check include/config.h to see if HAVE_ARPA_INET_H is
defined.

I think the problem is that "struct in_addr" isn't defined when it's
used, leading to the warning. That might or might stem from the fact
that Solaris doesn't seem to define INADDR_NONE:

http://docs.sun.com/app/docs/doc/816-5170/6mbb5escm?a=view

If so, we just need to be sure the correct .h file is included.

Your config.h shows what configure discovered. It should say you have
arpa/inet.h and maybe even INADDR_NONE.

BTW, are you sure you need --enable-sybase-compat?

HTH.

--jkl

-----------------------------------------
The information contained in this transmission may be privileged and
confidential and is intended only for the use of the person(s) named
above. If you are not the intended recipient, or an employee or agent
responsible
for delivering this message to the intended recipient, any review,
dissemination,
distribution or duplication of this communication is strictly prohibited. If
you are
not the intended recipient, please contact the sender immediately by reply
e-mail
and destroy all copies of the original message. Please note that we do not
accept
account orders and/or instructions by e-mail, and therefore will not be
responsible
for carrying out such orders and/or instructions. If you, as the intended
recipient
of this message, the purpose of which is to inform and update our clients,
prospects
and consultants of developments relating to our services and products, would
not
like to receive further e-mail correspondence from the sender, please "reply"
to the
sender indicating your wishes. In the U.S.: 1345 Avenue of the Americas, New
York,
NY 10105.





Archive powered by MHonArc 2.6.24.

Top of Page