From d9787447fe6a57e39113b60305b4ab672b9ba897 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Tue, 9 Feb 2021 16:00:19 +0900 Subject: Imported Upstream version 2.1.19 --- common/exectool.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'common/exectool.c') diff --git a/common/exectool.c b/common/exectool.c index ed8225a..c9e0020 100644 --- a/common/exectool.c +++ b/common/exectool.c @@ -384,7 +384,12 @@ gnupg_exec_tool_stream (const char *pgmname, const char *argv[], /* Now find the argument marker and replace by the pipe's fd. Yeah, that is an ugly non-thread safe hack but it safes us to create a copy of the array. */ +#ifdef HAVE_W32_SYSTEM + snprintf (extrafdbuf, sizeof extrafdbuf, "-&%lu", + (unsigned long)(void*)_get_osfhandle (extrapipe[0])); +#else snprintf (extrafdbuf, sizeof extrafdbuf, "-&%d", extrapipe[0]); +#endif for (argsaveidx=0; argv[argsaveidx]; argsaveidx++) if (!strcmp (argv[argsaveidx], "-&@INEXTRA@")) { -- cgit v1.2.3