Skip to content

Commit b8f3d23

Browse files
committed
espressif: fix build error when WIFI && !SSL
1 parent 126a1a4 commit b8f3d23

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ports/espressif/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,9 @@ SRC_C += \
303303
peripherals/i2c.c \
304304
peripherals/$(IDF_TARGET)/pins.c
305305

306+
ifeq ($(CIRCUITPY_SSL),1)
306307
SRC_C += lib/mbedtls_config/crt_bundle.c
308+
endif
307309

308310
SRC_C += $(wildcard common-hal/espidf/*.c)
309311

ports/espressif/common-hal/socketpool/Socket.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@
3131
#include "py/mperrno.h"
3232
#include "py/runtime.h"
3333
#include "shared-bindings/socketpool/SocketPool.h"
34+
#if CIRCUITPY_SSL
3435
#include "shared-bindings/ssl/SSLSocket.h"
3536
#include "shared-module/ssl/SSLSocket.h"
37+
#endif
3638
#include "supervisor/port.h"
3739
#include "supervisor/shared/tick.h"
3840
#include "supervisor/workflow.h"
@@ -359,12 +361,14 @@ size_t common_hal_socketpool_socket_bind(socketpool_socket_obj_t *self,
359361
}
360362

361363
void socketpool_socket_close(socketpool_socket_obj_t *self) {
364+
#if CIRCUITPY_SSL
362365
if (self->ssl_socket) {
363366
ssl_sslsocket_obj_t *ssl_socket = self->ssl_socket;
364367
self->ssl_socket = NULL;
365368
common_hal_ssl_sslsocket_close(ssl_socket);
366369
return;
367370
}
371+
#endif
368372
self->connected = false;
369373
int fd = self->num;
370374
// Ignore bogus/closed sockets

0 commit comments

Comments
 (0)