mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
dirmmgr: Use a portability wrapper for struct timeval.
* dirmngr/dirmngr_ldap.c [W32]: Include winber.h. (my_ldap_timeval_t): New.
This commit is contained in:
parent
4387ecb11c
commit
feda379595
@ -37,14 +37,15 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_W32_SYSTEM
|
#ifdef HAVE_W32_SYSTEM
|
||||||
#include <winsock2.h>
|
# include <winsock2.h>
|
||||||
#include <winldap.h>
|
# include <winldap.h>
|
||||||
#include <fcntl.h>
|
# include <winber.h>
|
||||||
#include "ldap-url.h"
|
# include <fcntl.h>
|
||||||
|
# include "ldap-url.h"
|
||||||
#else
|
#else
|
||||||
/* For OpenLDAP, to enable the API that we're using. */
|
/* For OpenLDAP, to enable the API that we're using. */
|
||||||
#define LDAP_DEPRECATED 1
|
# define LDAP_DEPRECATED 1
|
||||||
#include <ldap.h>
|
# include <ldap.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -97,6 +98,12 @@ static void npth_protect (void) { }
|
|||||||
# define my_ldap_free_attr(a) ldap_memfree ((a))
|
# define my_ldap_free_attr(a) ldap_memfree ((a))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_W32_SYSTEM
|
||||||
|
typedef LDAP_TIMEVAL my_ldap_timeval_t;
|
||||||
|
#else
|
||||||
|
typedef struct timeval my_ldap_timeval_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DEFAULT_LDAP_TIMEOUT 100 /* Arbitrary long timeout. */
|
#define DEFAULT_LDAP_TIMEOUT 100 /* Arbitrary long timeout. */
|
||||||
|
|
||||||
|
|
||||||
@ -154,7 +161,7 @@ struct my_opt_s
|
|||||||
{
|
{
|
||||||
int quiet;
|
int quiet;
|
||||||
int verbose;
|
int verbose;
|
||||||
struct timeval timeout; /* Timeout for the LDAP search functions. */
|
my_ldap_timeval_t timeout;/* Timeout for the LDAP search functions. */
|
||||||
unsigned int alarm_timeout; /* And for the alarm based timeout. */
|
unsigned int alarm_timeout; /* And for the alarm based timeout. */
|
||||||
int multi;
|
int multi;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user