Correct error for unknown protocol type in socket

This commit is contained in:
Jeremy Soller
2019-04-01 20:35:15 -06:00
parent f4c036c3aa
commit 862c76b25f
+1 -1
View File
@@ -241,7 +241,7 @@ impl PalSocket for Sys {
SOCK_STREAM => e(syscall::open("tcp:", flags)) as c_int,
SOCK_DGRAM => e(syscall::open("udp:", flags)) as c_int,
_ => {
errno = syscall::EPROTOTYPE;
errno = syscall::EPROTONOSUPPORT;
-1
}
}