diff options
author | Hugo Landau <hlandau@openssl.org> | 2024-02-08 10:55:24 +0100 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2024-02-09 12:03:52 +0100 |
commit | 1548e3cdaa3d478bdfbb214855a537be184db89f (patch) | |
tree | 8e3c19543d977781014cc2b7c9c442eb360f60e3 /ssl | |
parent | JSON_ENC: Fix unit test for MSVC (diff) | |
download | openssl-1548e3cdaa3d478bdfbb214855a537be184db89f.tar.xz openssl-1548e3cdaa3d478bdfbb214855a537be184db89f.zip |
QUIC QLOG: Retrieve PID correctly on Windows
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)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/quic/qlog.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 */ |