Skip to content

Commit

Permalink
coap_io.c: Fix compiler warnings that socket() is redefined
Browse files Browse the repository at this point in the history
Seems some compliers do not like socket being a variable name.
  • Loading branch information
mrdeep1 committed Jan 8, 2025
1 parent bd2c2b0 commit ea86105
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/coap_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -2043,23 +2043,23 @@ coap_socket_strerror(void) {
#endif /* _WIN32 */

COAP_API coap_fd_t
coap_socket_get_fd(coap_socket_t *socket) {
coap_socket_get_fd(coap_socket_t *sock) {
#if !defined(WITH_LWIP) && !defined(WITH_CONTIKI)
return socket->fd;
return sock->fd;
#else
(void)(socket);
(void)(sock);
return COAP_INVALID_SOCKET;
#endif
}

COAP_API coap_socket_flags_t
coap_socket_get_flags(coap_socket_t *socket) {
return socket->flags;
coap_socket_get_flags(coap_socket_t *sock) {
return sock->flags;
}

COAP_API void
coap_socket_set_flags(coap_socket_t *socket, coap_socket_flags_t flags) {
socket->flags = flags;
coap_socket_set_flags(coap_socket_t *sock, coap_socket_flags_t flags) {
sock->flags = flags;
}

#undef SIN6

0 comments on commit ea86105

Please sign in to comment.