Skip to content

std.posix.getsockopt() fails to set optlen value #24293

Closed
@blblack

Description

@blblack

Zig Version

0.15.0-dev.876+8eca338c2

Steps to Reproduce and Observed Behavior

var fd_type: c_int = 0;
std.posix.getsockopt(fd, std.posix.SOL.SOCKET, std.posix.SO.TYPE, std.mem.asBytes(&fd_type));
// ^ results in EINVAL errno, which is in turn handled as "unreachable" by std.posix code

Expected Behavior

Reachable code that successfully executes getsockopt()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorstandard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions