]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
QUIC QLOG: Retrieve PID correctly on Windows
authorHugo Landau <hlandau@openssl.org>
Thu, 8 Feb 2024 09:55:24 +0000 (09:55 +0000)
committerHugo Landau <hlandau@openssl.org>
Fri, 9 Feb 2024 11:03:52 +0000 (11:03 +0000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23517)

ssl/quic/qlog.c

index dc68ffb23924c0804f2a24d269721e4388eacbad..2cfa9af9d3053a8d7808b30a5ea82807a3514260 100644 (file)
@@ -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 */