libc: Fix constness of some socket functions
This commit is contained in:
parent
5ea73197ad
commit
ec3c1132d2
@ -14,10 +14,10 @@ extern "C"
|
||||
int socket(int domain, int type, int protocol);
|
||||
|
||||
/* Bind a socket to an address. */
|
||||
int bind(int sockfd, struct sockaddr* addr, socklen_t addrlen);
|
||||
int bind(int sockfd, const struct sockaddr* addr, socklen_t addrlen);
|
||||
|
||||
/* Connect a socket to a remote address. */
|
||||
int connect(int sockfd, struct sockaddr* addr, socklen_t addrlen);
|
||||
int connect(int sockfd, const struct sockaddr* addr, socklen_t addrlen);
|
||||
|
||||
/* Start listening on a socket. */
|
||||
int listen(int sockfd, int backlog);
|
||||
|
@ -11,13 +11,13 @@ extern "C"
|
||||
__errno_return(rc, int);
|
||||
}
|
||||
|
||||
int bind(int sockfd, struct sockaddr* addr, socklen_t addrlen)
|
||||
int bind(int sockfd, const struct sockaddr* addr, socklen_t addrlen)
|
||||
{
|
||||
long rc = syscall(SYS_bind, sockfd, addr, addrlen);
|
||||
__errno_return(rc, int);
|
||||
}
|
||||
|
||||
int connect(int sockfd, struct sockaddr* addr, socklen_t addrlen)
|
||||
int connect(int sockfd, const struct sockaddr* addr, socklen_t addrlen)
|
||||
{
|
||||
long rc = syscall(SYS_connect, sockfd, addr, addrlen);
|
||||
__errno_return(rc, int);
|
||||
|
Loading…
Reference in New Issue
Block a user