diff options
author | NIIBE Yutaka <[email protected]> | 2023-07-18 05:05:13 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2023-07-18 05:05:13 +0000 |
commit | ae188a3357cf9c90967eabdd304782dea40cd1a1 (patch) | |
tree | 71137bb70778572fcff54e3585171bb83908ea8a | |
parent | dirmngr,kbk,tools: Fix type casting. (diff) | |
download | gnupg-ae188a3357cf9c90967eabdd304782dea40cd1a1.tar.gz gnupg-ae188a3357cf9c90967eabdd304782dea40cd1a1.zip |
agent,build,w32: Fix use of SOCKET.
* configure.ac (HAVE_SOCKET): Detect SOCKET type.
* agent/command-ssh.c [HAVE_SOCKET] (start_command_handler_ssh): Use
SOCKET to cast.
--
GnuPG-bug-id: 6508
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r-- | agent/command-ssh.c | 4 | ||||
-rw-r--r-- | configure.ac | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/agent/command-ssh.c b/agent/command-ssh.c index ca3993321..0afa24111 100644 --- a/agent/command-ssh.c +++ b/agent/command-ssh.c @@ -3952,7 +3952,11 @@ start_command_handler_ssh (ctrl_t ctrl, gnupg_fd_t sock_client) es_syshd_t syshd; syshd.type = ES_SYSHD_SOCK; +#ifdef HAVE_SOCKET + syshd.u.sock = (SOCKET)sock_client; +#else syshd.u.sock = sock_client; +#endif get_client_info (sock_client, &peer_info); ctrl->client_pid = peer_info.pid; diff --git a/configure.ac b/configure.ac index fe7e82108..57bcdac4e 100644 --- a/configure.ac +++ b/configure.ac @@ -1385,6 +1385,8 @@ AC_CHECK_SIZEOF(time_t,,[[ ]]) GNUPG_TIME_T_UNSIGNED +# Check SOCKET type for Windows. +AC_CHECK_TYPES([SOCKET], [], [], [[#include "winsock2.h"]]) if test "$ac_cv_sizeof_unsigned_short" = "0" \ || test "$ac_cv_sizeof_unsigned_int" = "0" \ |