In src/socket.h SENETUNREACH is already defined as WSAENETUNREACH on Windows and ENETUNREACH on Linux.
While I'm unable to reproduce the build error locally (likely due to different mingw versions), I'm seeing github actions failing for the Godot WebRTC plugin here.
/home/runner/work/webrtc-native/webrtc-native/thirdparty/libdatachannel/deps/libjuice/src/agent.c:1601:14: error: 'ENETUNREACH' undeclared (first use in this function); did you mean 'SENETUNREACH'?
1601 | if (ret == ENETUNREACH)
| ^~~~~~~~~~~
| SENETUNREACH
Looking at src/socket.h I can see that it was properly set up to handle the different WSA/Posix socket cases correctly already:
In src/socket.h SENETUNREACH is already defined as WSAENETUNREACH on Windows and ENETUNREACH on Linux.
While I'm unable to reproduce the build error locally (likely due to different mingw versions), I'm seeing github actions failing for the Godot WebRTC plugin here.
Looking at
src/socket.h
I can see that it was properly set up to handle the different WSA/Posix socket cases correctly already:https://github.com/paullouisageneau/libjuice/blob/a1f4037aec9353ac3928ce4dcda1229b68db64b2/src/socket.h#L59
and
https://github.com/paullouisageneau/libjuice/blob/a1f4037aec9353ac3928ce4dcda1229b68db64b2/src/socket.h#L108