diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 622239f6b10..32211f11e53 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -1850,7 +1850,8 @@ do_open_tun(struct context *c, int *error_flags) #ifdef _WIN32 /* store (hide) interactive service handle in tuntap_options */ c->c1.tuntap->options.msg_channel = c->options.msg_channel; - msg(D_ROUTE, "interactive service msg_channel=%" PRIu64, (unsigned long long) c->options.msg_channel); + msg(D_ROUTE, "interactive service msg_channel=%" PRIuPTR, + (intptr_t) c->options.msg_channel); #endif /* allocate route list structure */ diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 9105449c7f8..2e41eea4e2c 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -7876,7 +7876,7 @@ add_option(struct options *options, #ifdef _WIN32 VERIFY_PERMISSION(OPT_P_GENERAL); HANDLE process = GetCurrentProcess(); - HANDLE handle = (HANDLE) atoll(p[1]); + HANDLE handle = (HANDLE) ((intptr_t) atoll(p[1])); if (!DuplicateHandle(process, handle, process, &options->msg_channel, 0, FALSE, DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS)) {