Fix posix.sendto for Windows#24466
Closed
IntegratedQuantum wants to merge 1 commit intoziglang:masterfrom
Closed
Conversation
4 tasks
andrewrk
requested changes
Jul 15, 2025
Member
andrewrk
left a comment
There was a problem hiding this comment.
I don't see how this fixes anything?
/// A libc-compatible API layer.
pub const system = if (use_libc)
std.c
else switch (native_os) {
.linux => linux,
.plan9 => std.os.plan9,
else => struct {
pub const ucontext_t = void;
pub const pid_t = void;
pub const pollfd = void;
pub const fd_t = void;
pub const uid_t = void;
pub const gid_t = void;
},
};
IntegratedQuantum
added a commit
to PixelGuys/Cubyz
that referenced
this pull request
Jul 15, 2025
For reference: ziglang/zig#24329 some commits have been extracted from #1583, but the x86_64 backend has been disabled due to its horrible performance. Remaining work: - [x] Wait for official builds on ziglang.org and upload them to our repository - [x] Add workaround for ziglang/zig#24466 - [x] Fix TODO comment about ANSI support in stdout - [x] Check for compile-time performance changes → it went from 13.1 to 11.9 seconds 🎉
Contributor
Author
sendto is part of Lines 10620 to 10627 in d4a191f |
Member
|
Even when linking libc, Zig std lib bypasses libc for most stuff on Windows, because libc on Windows is pretty crap. I'll fix this... |
Member
Contributor
Author
|
thanks |
Member
|
Sorry for the trouble. Those functions will be deleted eventually when I properly tackle #6600 but it's not time yet. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It appears that the sendto function was removed from
std.os.windows.This changes it to use
system.sendto,systemis also used for other socket functions such asrecvfrom