Add unix(4) SO_ERROR.

This commit is contained in:
Jonas 'Sortie' Termansen 2024-04-22 23:03:13 +02:00
parent 251e770e07
commit 0e31e0c578
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2014, 2016, 2017, 2021, 2022 Jonas 'Sortie' Termansen.
* Copyright (c) 2013-2014, 2016-2017, 2021-2022, 2024 Jonas 'Sortie' Termansen.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@ -390,6 +390,7 @@ int StreamSocket::getsockopt(ioctx_t* ctx, int level, int option_name,
{
case SO_RCVBUF: result = incoming.Size(); break;
case SO_SNDBUF: result = outgoing.Size(); break;
case SO_ERROR: result = 0; break;
default: return errno = ENOPROTOOPT, -1; break;
}