1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

common,w32: Add missing GetLastError->errno mapping.

* common/iobuf.c (file_filter, sock_filter): Add missing mapping.
--

GnuPG-bug-id: 6528
(cherry picked from commit 5e94470d05)

Also includes commit a3be97df4d
This commit is contained in:
Werner Koch 2023-07-04 09:19:05 +02:00
parent bb157044a0
commit 1e9ac18f88
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 9 additions and 6 deletions

View file

@ -319,15 +319,17 @@ map_w32_to_errno (DWORD w32_err)
#endif /*HAVE_W32_SYSTEM*/
/* Set ERRNO from the Windows error. EC may be -1 to use the last error. */
/* Set ERRNO from the Windows error. EC may be -1 to use the last
* error. Returns the Windows error code. */
#ifdef HAVE_W32_SYSTEM
void
int
gnupg_w32_set_errno (int ec)
{
/* FIXME: Replace by gpgrt_w32_set_errno. */
if (ec == -1)
ec = GetLastError ();
_set_errno (map_w32_to_errno (ec));
return ec;
}
#endif /*HAVE_W32_SYSTEM*/