diff options
| author | Loris Cro <kappaloris@gmail.com> | 2023-06-18 09:06:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-18 09:06:40 +0200 |
| commit | 216ef10dc471e4db60a30208be178d6c59efeaaf (patch) | |
| tree | 8c239dab283ae9cb3b7fe099bae240bcc53f894e /lib/std/c.zig | |
| parent | 0fc1d396495c1ab482197021dedac8bea3f9401c (diff) | |
| parent | 729a051e9e38674233190aea23c0ac8c134f2d67 (diff) | |
| download | zig-216ef10dc471e4db60a30208be178d6c59efeaaf.tar.gz zig-216ef10dc471e4db60a30208be178d6c59efeaaf.zip | |
Merge branch 'master' into autodoc-searchkey
Diffstat (limited to 'lib/std/c.zig')
| -rw-r--r-- | lib/std/c.zig | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/std/c.zig b/lib/std/c.zig index a0b65c31c8..c0ee29445a 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -20,7 +20,7 @@ pub const Tokenizer = tokenizer.Tokenizer; /// If linking gnu libc (glibc), the `ok` value will be true if the target /// version is greater than or equal to `glibc_version`. /// If linking a libc other than these, returns `false`. -pub fn versionCheck(comptime glibc_version: std.builtin.Version) type { +pub fn versionCheck(comptime glibc_version: std.SemanticVersion) type { return struct { pub const ok = blk: { if (!builtin.link_libc) break :blk false; @@ -213,7 +213,12 @@ pub extern "c" fn sendto( ) isize; pub extern "c" fn sendmsg(sockfd: c.fd_t, msg: *const c.msghdr_const, flags: u32) isize; -pub extern "c" fn recv(sockfd: c.fd_t, arg1: ?*anyopaque, arg2: usize, arg3: c_int) isize; +pub extern "c" fn recv( + sockfd: c.fd_t, + arg1: ?*anyopaque, + arg2: usize, + arg3: c_int, +) if (builtin.os.tag == .windows) c_int else isize; pub extern "c" fn recvfrom( sockfd: c.fd_t, noalias buf: *anyopaque, @@ -221,7 +226,7 @@ pub extern "c" fn recvfrom( flags: u32, noalias src_addr: ?*c.sockaddr, noalias addrlen: ?*c.socklen_t, -) isize; +) if (builtin.os.tag == .windows) c_int else isize; pub extern "c" fn recvmsg(sockfd: c.fd_t, msg: *c.msghdr, flags: u32) isize; pub extern "c" fn kill(pid: c.pid_t, sig: c_int) c_int; |
