Skip to content

Commit 76f085b

Browse files
authored
Merge pull request #10908 from kivaisan/fix_armc6_netconn_recv_tcp_pbuf
Fix netconn_recv_tcp_pbuf ARMC6 linker error
2 parents 193ba0f + ff88a75 commit 76f085b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

features/lwipstack/LWIPStack.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ nsapi_size_or_error_t LWIP::socket_send(nsapi_socket_t handle, const void *data,
463463

464464
nsapi_size_or_error_t LWIP::socket_recv(nsapi_socket_t handle, void *data, nsapi_size_t size)
465465
{
466+
#if LWIP_TCP
466467
struct mbed_lwip_socket *s = (struct mbed_lwip_socket *)handle;
467468

468469
if (!s->buf) {
@@ -483,6 +484,9 @@ nsapi_size_or_error_t LWIP::socket_recv(nsapi_socket_t handle, void *data, nsapi
483484
}
484485

485486
return recv;
487+
#else
488+
return NSAPI_ERROR_UNSUPPORTED;
489+
#endif
486490
}
487491

488492
nsapi_size_or_error_t LWIP::socket_sendto(nsapi_socket_t handle, const SocketAddress &address, const void *data, nsapi_size_t size)

0 commit comments

Comments
 (0)