x/os/socket_posix.zig: make linger struct extern

Co-authored-by: LemonBoy <LemonBoy@users.noreply.github.com>
This commit is contained in:
Kenta Iwasaki 2021-05-08 23:39:51 +09:00 committed by lithdew
parent e739b2b7d6
commit a24101be5b

View File

@ -156,7 +156,7 @@ pub const Socket = struct {
/// seconds.
pub fn setLinger(self: Socket, timeout_seconds: ?u16) !void {
if (comptime @hasDecl(os, "SO_LINGER")) {
const settings = struct {
const settings = extern struct {
l_onoff: c_int,
l_linger: c_int,
}{