aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2024-12-13 01:29:16 +0000
committerNIIBE Yutaka <[email protected]>2024-12-13 01:29:16 +0000
commitcc6c29735d59e832be67f487e0c74e049ceaea94 (patch)
treefc8a90c4f5a9a585ec77db77197258eb5591439e
parentFix FreeBSD to set the pid of assuan_peercred_t. (diff)
downloadlibassuan-cc6c29735d59e832be67f487e0c74e049ceaea94.tar.gz
libassuan-cc6c29735d59e832be67f487e0c74e049ceaea94.zip
w32: Fix errno for assuan_sock_bind failure.
* src/assuan-socket.c (_assuan_sock_bind): Use WSAGetLastError and the mapping to set ERRNO. -- GnuPG-bug-id: 7456 Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--src/assuan-socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/assuan-socket.c b/src/assuan-socket.c
index 6b9f6ca..2b148d1 100644
--- a/src/assuan-socket.c
+++ b/src/assuan-socket.c
@@ -1312,7 +1312,7 @@ _assuan_sock_bind (assuan_context_t ctx, assuan_fd_t sockfd,
(struct sockaddr *)&myaddr, &len);
if (rc)
{
- int save_e = errno;
+ int save_e = _assuan_sock_wsa2errno (WSAGetLastError ());
CloseHandle (filehd);
MyDeleteFile (unaddr->sun_path);
gpg_err_set_errno (save_e);