Skip to content

Commit 57a0dbd

Browse files
joelguittetnashif
authored andcommitted
net: websocket: fix undefined reference
Fix undefined reference to MSG_DONTWAIT while building websocket client. Signed-off-by: Joel Guittet <[email protected]> (cherry picked from commit 4c16ec1)
1 parent 9b58209 commit 57a0dbd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

subsys/net/lib/websocket/websocket.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,8 @@ static int websocket_prepare_and_send(struct websocket_context *ctx,
645645
k_timepoint_t req_end_timepoint = sys_timepoint_calc(req_timeout);
646646

647647
return sendmsg_all(ctx->real_sock, &msg,
648-
K_TIMEOUT_EQ(tout, K_NO_WAIT) ? MSG_DONTWAIT : 0, req_end_timepoint);
648+
K_TIMEOUT_EQ(tout, K_NO_WAIT) ? ZSOCK_MSG_DONTWAIT : 0,
649+
req_end_timepoint);
649650
#endif /* CONFIG_NET_TEST */
650651
}
651652

@@ -995,7 +996,7 @@ int websocket_recv_msg(int ws_sock, uint8_t *buf, size_t buf_len,
995996
ret = wait_rx(ctx->real_sock, timeout_to_ms(&tout));
996997
if (ret == 0) {
997998
ret = zsock_recv(ctx->real_sock, ctx->recv_buf.buf,
998-
ctx->recv_buf.size, MSG_DONTWAIT);
999+
ctx->recv_buf.size, ZSOCK_MSG_DONTWAIT);
9991000
if (ret < 0) {
10001001
ret = -errno;
10011002
}

0 commit comments

Comments
 (0)