Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SENETUNREACH to fix some windows builds #225

Merged
merged 1 commit into from
Oct 21, 2023

Conversation

Faless
Copy link
Contributor

@Faless Faless commented Oct 21, 2023

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:

#define SENETUNREACH WSAENETUNREACH

and

#define SENETUNREACH ENETUNREACH

In src/socket.h SENETUNREACH is already defined as WSAENETUNREACH on
Windows and ENETUNREACH on Linux.
Copy link
Owner

@paullouisageneau paullouisageneau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, my bad 🤦 Thank you for the fix!

@paullouisageneau paullouisageneau merged commit 025ee38 into paullouisageneau:master Oct 21, 2023
3 checks passed
@Faless Faless deleted the fix_enetunrech_win branch October 21, 2023 17:17
@paullouisageneau
Copy link
Owner

Released as v1.3.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants