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

Re: (ITS#3658) libldap fails to Bind to a server on Windows

Thanks, this is now fixed in HEAD.

alexey.melnikov@isode.com wrote:

>Full_Name: Alexey Melnikov
>Version: 2.3
>OS: Windows XP
>Submission from: (NULL) (
>Building OpenLDAP (CVS HEAD) on Windows XP, I've noticed that ldapsearch 
>and friends were failing to connect. After further investigation I found 
>out that libraries/libldap/os-ip.c was broken:
>#ifdef FD_SETSIZE
>         if ( s >= FD_SETSIZE ) {
>             rc = AC_SOCKET_ERROR;
>             tcp_close( s );
>             ldap_pvt_set_errno( EMFILE );
>             return rc;
>         }
>This doesn't work on Windows, I got "s" value bigger than 1900 and it is 
>of course bigger than FD_SETSIZE == 128 (or whatever the default is on 
>Windows). On Windows fd_set is a struct containing an array of
>sockets, so this check should not be done. A fix is to wrap the code in
>#ifndef HAVE_WINSOCK/#endif.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support