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

(ITS#7332) Patch to build using Microsoft Visual Studio

Full_Name: Mat Booth
Version: 2.4.31
OS: Windows XP
URL: http://people.apache.org/~mbooth/0001-Changes-required-to-build-with-Microsoft-Visual-Stud.patch
Submission from: (NULL) (

The provided patch makes three changes that were necessary for me to build
liblber and libldap on Windows using Microsoft Visual Studio.

 * include/ac/socket.h
The type socklen_t is defined in ws2tcpip.h on the Windows platform, so include
this header when including winsock2.h

 * libraries/libldap/ldap-int.h
The struct timeval is defined in winsock.h or winsock2.h on the Windows platform
so include ac/socket.h when _WIN32 is defined (The comment in winsock2.h
literary says "taken from the BSD file sys/time.h")

 * libraries/libldap/util-int.c
The error code EAI_SYSTEM is not defined at all on the Windows platform, so only
use it if it's defined.

The attached patch file is derived from OpenLDAP Software. All of the
modifications to OpenLDAP Software represented in the following patch(es) were
developed by Mat Booth <mbooth@apache.org>. I have not assigned rights and/or
interest in this work to any party.

I, Mat Booth, hereby place the following modifications to OpenLDAP Software (and
only these modifications) into the public domain. Hence, these modifications may
be freely used and/or redistributed for any purpose with or without attribution
and/or other notice.