]> git.ipfire.org Git - thirdparty/gcc.git/commit
diagnostics: fix socket includes for MinGW host [PR122666]
authorEvgeny Karpov <evgeny@kmaps.co>
Mon, 17 Nov 2025 19:08:58 +0000 (14:08 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Mon, 17 Nov 2025 19:08:58 +0000 (14:08 -0500)
commit5ce13174c0cf8271f37ca72d1bfc5560b35448dc
treece460f89606ed7098810a0abc86b4636dc3a1a19
parent49217e18b3a14b26745d35ca7ed75e377a5320ed
diagnostics: fix socket includes for MinGW host [PR122666]

The commit "diagnostics: add experimental SARIF JSON-RPC notifications
for IDEs [PR115970]"

https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=8a155c170b443e332b3db4922f0f0d588a17604f

introduces a regression when building the toolchain for the
aarch64-w64-mingw32 host, at least. It is most likely the same for
*-*-mingw32 targets.

This patch resolves the issue when using sockets for SARIF JSON-RPC
notifications on MinGW host and adds the required socket library to the
host file for *-*-mingw.

Signed-off-by: Evgeny Karpov <evgeny@kmaps.co>
gcc/ChangeLog:
PR diagnostics/122666
* config/i386/x-mingw32 (LIBS): Add -lws2_32
* diagnostics/sarif-sink.cc: Move sockets includes to before
config.h and support __MINGW32__.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/config/i386/x-mingw32
gcc/diagnostics/sarif-sink.cc