Make sure the send() signature is correct, buf should be const.
This commit is contained in:
parent
e382e24337
commit
9a3a5bc2de
|
@ -547,7 +547,7 @@ ssize_t net_recv(int fd, void* buf, size_t len, int flags)
|
|||
}
|
||||
|
||||
|
||||
ssize_t net_send(int fd, void* buf, size_t len, int flags)
|
||||
ssize_t net_send(int fd, const void* buf, size_t len, int flags)
|
||||
{
|
||||
ssize_t ret = send(fd, buf, len, flags);
|
||||
if (ret >= 0)
|
||||
|
|
|
@ -163,7 +163,7 @@ extern ssize_t net_recv(int fd, void* buf, size_t len, int flags);
|
|||
/**
|
||||
* A wrapper for the send() function call.
|
||||
*/
|
||||
extern ssize_t net_send(int fd, void* buf, size_t len, int flags);
|
||||
extern ssize_t net_send(int fd, const void* buf, size_t len, int flags);
|
||||
|
||||
/**
|
||||
* This tries to create a AF_INET6 socket.
|
||||
|
|
Loading…
Reference in New Issue