mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 18:56:29 +00:00
libc: pretend to support SO_ERROR
There are programs, e.g. curl, that check if a connection was established successfully by looking at SO_ERROR. Pretend that the getsockopt() call was executed to keep them happy. If they try to use a broken connection, the other socket functions will bail.
This commit is contained in:
parent
5b6735e1c9
commit
dbec8d7710
@ -673,6 +673,10 @@ extern "C" int socket_fs_getsockopt(int libc_fd, int level, int optname,
|
||||
Genode::log("getsockopt: SO_REUSEADDR not yet implemented - return true");
|
||||
*(int *)optval = 1;
|
||||
return 0;
|
||||
case SO_ERROR:
|
||||
Genode::log("getsockopt: SO_ERROR not yet implemented - return true");
|
||||
*(int *)optval = 0;
|
||||
return 0;
|
||||
default: return Errno(ENOPROTOOPT);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user