1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

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 <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2023-07-18 14:05:13 +09:00
parent 81055baf5c
commit ae188a3357
No known key found for this signature in database
GPG Key ID: 640114AF89DE6054
2 changed files with 6 additions and 0 deletions

View File

@ -3952,7 +3952,11 @@ start_command_handler_ssh (ctrl_t ctrl, gnupg_fd_t sock_client)
es_syshd_t syshd; es_syshd_t syshd;
syshd.type = ES_SYSHD_SOCK; syshd.type = ES_SYSHD_SOCK;
#ifdef HAVE_SOCKET
syshd.u.sock = (SOCKET)sock_client;
#else
syshd.u.sock = sock_client; syshd.u.sock = sock_client;
#endif
get_client_info (sock_client, &peer_info); get_client_info (sock_client, &peer_info);
ctrl->client_pid = peer_info.pid; ctrl->client_pid = peer_info.pid;

View File

@ -1385,6 +1385,8 @@ AC_CHECK_SIZEOF(time_t,,[[
]]) ]])
GNUPG_TIME_T_UNSIGNED GNUPG_TIME_T_UNSIGNED
# Check SOCKET type for Windows.
AC_CHECK_TYPES([SOCKET], [], [], [[#include "winsock2.h"]])
if test "$ac_cv_sizeof_unsigned_short" = "0" \ if test "$ac_cv_sizeof_unsigned_short" = "0" \
|| test "$ac_cv_sizeof_unsigned_int" = "0" \ || test "$ac_cv_sizeof_unsigned_int" = "0" \