mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-13 22:21:09 +02:00
dirmngr: More fix for Windows.
* dirmngr/dns.c (socket_fd_t, STDCALL): New. (dns_te_initname): Use. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
6755b3b505
commit
5af104b541
@ -54,10 +54,14 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
|
typedef SOCKET socket_fd_t;
|
||||||
|
#define STDCALL __stdcall
|
||||||
#ifdef TIME_WITH_SYS_TIME
|
#ifdef TIME_WITH_SYS_TIME
|
||||||
#include <sys/time.h> /* gettimeofday(2) */
|
#include <sys/time.h> /* gettimeofday(2) */
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
|
typedef int socket_fd_t;
|
||||||
|
#define STDCALL
|
||||||
#include <sys/time.h> /* gettimeofday(2) */
|
#include <sys/time.h> /* gettimeofday(2) */
|
||||||
#include <sys/types.h> /* FD_SETSIZE socklen_t */
|
#include <sys/types.h> /* FD_SETSIZE socklen_t */
|
||||||
#include <sys/select.h> /* FD_ZERO FD_SET fd_set select(2) */
|
#include <sys/select.h> /* FD_ZERO FD_SET fd_set select(2) */
|
||||||
@ -4448,7 +4452,7 @@ struct dns_trace {
|
|||||||
} cnames;
|
} cnames;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void dns_te_initname(struct sockaddr_storage *ss, int fd, int (*f)(int, struct sockaddr *, socklen_t *)) {
|
static void dns_te_initname(struct sockaddr_storage *ss, int fd, int (* STDCALL f)(socket_fd_t, struct sockaddr *, socklen_t *)) {
|
||||||
socklen_t n = sizeof *ss;
|
socklen_t n = sizeof *ss;
|
||||||
|
|
||||||
if (0 != f(fd, (struct sockaddr *)ss, &n))
|
if (0 != f(fd, (struct sockaddr *)ss, &n))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user