From: Hugo Landau Date: Thu, 8 Feb 2024 09:55:24 +0000 (+0000) Subject: QUIC QLOG: Retrieve PID correctly on Windows X-Git-Tag: openssl-3.3.0-alpha1~123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1548e3cdaa3d478bdfbb214855a537be184db89f;p=thirdparty%2Fopenssl.git QUIC QLOG: Retrieve PID correctly on Windows Reviewed-by: Tomas Mraz Reviewed-by: Tom Cosgrove Reviewed-by: Neil Horman (Merged from https://github.com/openssl/openssl/pull/23517) --- diff --git a/ssl/quic/qlog.c b/ssl/quic/qlog.c index dc68ffb2392..2cfa9af9d30 100644 --- a/ssl/quic/qlog.c +++ b/ssl/quic/qlog.c @@ -316,9 +316,12 @@ static void qlog_event_seq_header(QLOG *qlog) ossl_json_key(&qlog->json, "process_id"); ossl_json_u64(&qlog->json, qlog->info.override_process_id); } else { -#if defined(OPENSSL_SYS_UNIX) || defined(OPENSSL_SYS_WINDOWS) +#if defined(OPENSSL_SYS_UNIX) ossl_json_key(&qlog->json, "process_id"); ossl_json_u64(&qlog->json, (uint64_t)getpid()); +#elif defined(OPENSSL_SYS_WINDOWS) + ossl_json_key(&qlog->json, "process_id"); + ossl_json_u64(&qlog->json, (uint64_t)GetCurrentProcessId()); #endif } } /* system_info */