diff --git a/samples/cellular/modem_shell/overlay-esp-wifi.conf b/samples/cellular/modem_shell/overlay-esp-wifi.conf index 06b351f2f95e..67bda4b0c70f 100644 --- a/samples/cellular/modem_shell/overlay-esp-wifi.conf +++ b/samples/cellular/modem_shell/overlay-esp-wifi.conf @@ -15,6 +15,8 @@ CONFIG_NET_IPV6=y CONFIG_NET_NATIVE=y CONFIG_NET_SHELL=y +# Wi-Fi subsystem uses Zephyr's getopt. +CONFIG_GETOPT_LIB=n CONFIG_NET_L2_WIFI_SHELL=y # Should be set when CONFIG_NET_L2_WIFI_SHELL is enabled. # Printing 'wifi scan' command results puts pressure on queues in new locking design in net_mgmt. diff --git a/samples/cellular/modem_shell/overlay-nrf7002ek-wifi-scan-only.conf b/samples/cellular/modem_shell/overlay-nrf7002ek-wifi-scan-only.conf index 73cf09e5ddc0..e8b67b207d3a 100644 --- a/samples/cellular/modem_shell/overlay-nrf7002ek-wifi-scan-only.conf +++ b/samples/cellular/modem_shell/overlay-nrf7002ek-wifi-scan-only.conf @@ -30,6 +30,8 @@ CONFIG_WIFI_NRF700X=y # Also see comments for CONFIG_HEAP_MEM_POOL_SIZE. CONFIG_WIFI_MGMT_SCAN_MAX_BSS_CNT=50 +# Wi-Fi subsystem uses Zephyr's getopt. +CONFIG_GETOPT_LIB=n CONFIG_NET_L2_WIFI_SHELL=y # Should be set when CONFIG_NET_L2_WIFI_SHELL is enabled. # Printing 'wifi scan' command results puts pressure on queues in new locking design in net_mgmt. diff --git a/samples/cellular/modem_shell/src/location/location_shell.c b/samples/cellular/modem_shell/src/location/location_shell.c index 93013bea591e..e55eb2d0e547 100644 --- a/samples/cellular/modem_shell/src/location/location_shell.c +++ b/samples/cellular/modem_shell/src/location/location_shell.c @@ -9,6 +9,9 @@ #include #include +#ifdef CONFIG_GETOPT +#include +#endif #include #include #if defined(CONFIG_NRF_CLOUD_REST) diff --git a/samples/cellular/modem_shell/src/ping/icmp_ping_shell.c b/samples/cellular/modem_shell/src/ping/icmp_ping_shell.c index 9198fd888cfc..ca1ce9bdd7d3 100644 --- a/samples/cellular/modem_shell/src/ping/icmp_ping_shell.c +++ b/samples/cellular/modem_shell/src/ping/icmp_ping_shell.c @@ -8,6 +8,9 @@ #include #include +#ifdef CONFIG_GETOPT +#include +#endif #include #include "link_api.h" diff --git a/samples/cellular/modem_shell/src/rest/rest_shell.c b/samples/cellular/modem_shell/src/rest/rest_shell.c index def040e1523e..6b3fd4846d98 100644 --- a/samples/cellular/modem_shell/src/rest/rest_shell.c +++ b/samples/cellular/modem_shell/src/rest/rest_shell.c @@ -9,6 +9,9 @@ #include #include +#ifdef CONFIG_GETOPT +#include +#endif #include #include diff --git a/samples/cellular/modem_shell/src/sms/sms_shell.c b/samples/cellular/modem_shell/src/sms/sms_shell.c index 194b76ad23c1..ab459a094b6d 100644 --- a/samples/cellular/modem_shell/src/sms/sms_shell.c +++ b/samples/cellular/modem_shell/src/sms/sms_shell.c @@ -8,6 +8,9 @@ #include #include #include +#ifdef CONFIG_GETOPT +#include +#endif #include #include "sms.h"