[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: compiling problem: os-ip.c



On Tue, 17 Oct 2000 19:48:24 +0200, Stig Venås wrote:
> On Tue, Oct 17, 2000 at 06:39:44PM +0200, Armin Leitner wrote:
> > Hi,
> > 
> > I have tried to compile openldap-2.0.x (1, 4 and 6) on my linux-box and I 
> > always get the following error message:
> > 
> > cc -g -O2 -I../../include -I../../include -c os-ip.c  -fPIC -DPIC -o .libs/os-ip
> > .lo
> > os-ip.c: In function `ldap_connect_to_host':
> > os-ip.c:297: storage size of `hints' isn't known
> 
> Looks like getaddrinfo was found somewhere, but not the definition of
> struct addrinfo. Could you see if you have struct addrinfo defined
> somewhere?
> 
> We could try something like
> 
> AC_CACHE_CHECK([for getaddrinfo], ac_cv_func_getaddrinfo,
> [AC_TRY_COMPILE([#include <netdb.h>],
>                 [struct addrinfo h;getaddrinfo("","",&h,&h);],
>   ac_cv_func_getaddrinfo=yes, ac_cv_func_getaddrinfo=no)])
> if test "$ac_cv_func_getaddrinfo" = yes; then
>   AC_DEFINE(HAVE_GETADDRINFO,1,[Define if you have the getaddrinfo function])
> fi
> 
> instead of using AC_CHECK_FUNCS perhaps. If you have struct addrinfo
> defined somewhere, we should try to include that file, not sure how to
> write the configure code though. struct addrinfo should be defined at
> the same place as getaddrinfo, can it be that AC_CHECK_FUNCS finds
> getaddrinfo in a file that isn't included, how to include that file?
> 
> Comments anyone?
> 
> Stig
> 
Hi Stig,

I have searched standard paths and some additional places for the "addrinfo" 
definition without any success. Configure seems to make a good work, but 
not good enought for such broken linux-installations than mine :-(

regards

Armin