Sfoglia il codice sorgente

Make `EINVAL` generic in FreeBSD `Socket_Option_Error`

The documentation for `setsockopt(2)` mentioned accept filters for
`EINVAL`, but I've found that it can arise for any manner of invalid
values for setting socket options.

We'll just have to leave this as a generic error.
Feoramund 1 anno fa
parent
commit
5ece6980eb
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      core/net/errors_freebsd.odin

+ 2 - 1
core/net/errors_freebsd.odin

@@ -180,7 +180,8 @@ Socket_Option_Error :: enum c.int {
 	Not_Socket                                           = cast(c.int)freebsd.Errno.ENOTSOCK,
 	Unknown_Option_For_Level                             = cast(c.int)freebsd.Errno.ENOPROTOOPT,
 	Argument_In_Invalid_Address_Space                    = cast(c.int)freebsd.Errno.EFAULT,
-	Cannot_Install_Accept_Filter_On_Non_Listening_Socket = cast(c.int)freebsd.Errno.EINVAL,
+	// This error can arise for many different reasons.
+	Invalid_Value                                        = cast(c.int)freebsd.Errno.EINVAL,
 	System_Memory_Allocation_Failed                      = cast(c.int)freebsd.Errno.ENOMEM,
 	Insufficient_System_Resources                        = cast(c.int)freebsd.Errno.ENOBUFS,
 }