Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion include/enet.h
Original file line number Diff line number Diff line change
Expand Up @@ -5655,8 +5655,15 @@ extern "C" {

if (address != NULL) {
address->host = sin.sin6_addr;
address->port = ENET_NET_TO_HOST_16(sin.sin6_port);
address->sin6_scope_id = sin.sin6_scope_id;
if (sin.sin6_family == AF_INET || (sin.sin6_family == AF_UNSPEC && sin.sin6_len == sizeof(struct sockaddr_in)))
Copy link
Member

@zpl-zak zpl-zak Jan 6, 2025

Choose a reason for hiding this comment

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

The linux worker has failed to compile the code since sin does not have sin6_len defined. (afaik the field is only present if SIN6_LEN is defined)

Some adjustments have to be made to account for this difference on Linux platforms, whilst keeping the logic intact.

https://github.com/zpl-c/enet/actions/runs/12627791563/job/35194617740?pr=60#step:4:9

{
enet_inaddr_map4to6(((struct sockaddr_in*)&sin)->sin_addr, &address->host);
address->sin6_scope_id = 0;
}

address->port = ENET_NET_TO_HOST_16(sin.sin6_port);

}

return recvLength;
Expand Down
Loading