From 1548e3cdaa3d478bdfbb214855a537be184db89f Mon Sep 17 00:00:00 2001 From: Hugo Landau Date: Thu, 8 Feb 2024 09:55:24 +0000 Subject: 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) --- ssl/quic/qlog.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ssl') diff --git a/ssl/quic/qlog.c b/ssl/quic/qlog.c index dc68ffb239..2cfa9af9d3 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 */ -- cgit v1.2.3