diff --git a/arch/arm/src/stm32l4/stm32l4_spi.c b/arch/arm/src/stm32l4/stm32l4_spi.c index 9d9db706e07..67efad4aa8f 100644 --- a/arch/arm/src/stm32l4/stm32l4_spi.c +++ b/arch/arm/src/stm32l4/stm32l4_spi.c @@ -41,7 +41,7 @@ * are provided by common STM32 logic. To use this common SPI logic on your * board: * - * 1. Provide logic in stm32l4_boardinitialize() to configure SPI chip select + * 1. Provide logic in stm32l4_board_initialize() to configure SPI chip select * pins. * 2. Provide stm32l4_spi1/2/3select() and stm32l4_spi1/2/3status() functions in your * board-specific logic. These functions will perform chip selection and diff --git a/arch/arm/src/stm32l4/stm32l4_spi.h b/arch/arm/src/stm32l4/stm32l4_spi.h index 223cfb2b3df..7f5390f3477 100644 --- a/arch/arm/src/stm32l4/stm32l4_spi.h +++ b/arch/arm/src/stm32l4/stm32l4_spi.h @@ -97,7 +97,7 @@ FAR struct spi_dev_s *stm32l4_spibus_initialize(int bus); * (including stm32l4_spibus_initialize()) are provided by common STM32 logic. To use this * common SPI logic on your board: * - * 1. Provide logic in stm32l4_boardinitialize() to configure SPI chip select + * 1. Provide logic in stm32l4_board_initialize() to configure SPI chip select * pins. * 2. Provide stm32l4_spi1/2/...select() and stm32l4_spi1/2/...status() functions in your * board-specific logic. These functions will perform chip selection and diff --git a/arch/arm/src/stm32l4/stm32l4_start.c b/arch/arm/src/stm32l4/stm32l4_start.c index b2053f25ed0..4c1219b7605 100644 --- a/arch/arm/src/stm32l4/stm32l4_start.c +++ b/arch/arm/src/stm32l4/stm32l4_start.c @@ -53,6 +53,7 @@ #include "stm32l4.h" #include "stm32l4_gpio.h" #include "stm32l4_userspace.h" +#include "stm32l4_start.h" #ifdef CONFIG_ARCH_FPU # include "nvic.h" @@ -358,7 +359,7 @@ void __start(void) /* Initialize onboard resources */ - stm32l4_boardinitialize(); + stm32l4_board_initialize(); showprogress('F'); /* Then start NuttX */ diff --git a/arch/arm/src/stm32l4/stm32l4_start.h b/arch/arm/src/stm32l4/stm32l4_start.h new file mode 100644 index 00000000000..618b5cdcb7c --- /dev/null +++ b/arch/arm/src/stm32l4/stm32l4_start.h @@ -0,0 +1,59 @@ +/************************************************************************************ + * arch/arm/src/stm32l4/stm32l4_start.h + * + * Copyrigth (C) 2017 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32L4_STM32L4_START_H +#define __ARCH_ARM_SRC_STM32L4_STM32L4_START_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +/************************************************************************************ + * Public Function Prototypes + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32l4_board_initialize + * + * Description: + * All STM32L4 architectures must provide the following entry point. This entry + * point is called early in the initialization -- after all memory has been + * configured and mapped but before any devices have been initialized. + * + ************************************************************************************/ + +void stm32l4_board_initialize(void); + +#endif /* __ARCH_ARM_SRC_STM32L4_STM32L4_START_H */ diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile index 5668604ce57..e57b914c8e0 100644 --- a/arch/sim/src/Makefile +++ b/arch/sim/src/Makefile @@ -249,7 +249,7 @@ board/libboard$(LIBEXT): # Change the names of most symbols that conflict with libc symbols. GNU: - $(Q) mkdir ./GNU + $(Q) mkdir -p ./GNU GNU/Linux-names.dat: GNU nuttx-names.dat $(Q) cp nuttx-names.dat $@ diff --git a/arch/sim/src/up_devconsole.c b/arch/sim/src/up_devconsole.c index cc863a227ca..33a15c65d4d 100644 --- a/arch/sim/src/up_devconsole.c +++ b/arch/sim/src/up_devconsole.c @@ -43,6 +43,7 @@ #include #include #include +#include #include @@ -97,12 +98,13 @@ static ssize_t devconsole_read(struct file *filep, char *buffer, size_t len) * on the first read. */ - ch = simuart_getc(); + ch = simuart_getc(!(filep->f_oflags & O_NONBLOCK)); if (ch < 0) { - set_errno(EIO); + /* errno is set in upper layer according to returned value */ + sched_unlock(); - return ERROR; + return ch; } *buffer++ = ch; diff --git a/arch/sim/src/up_internal.h b/arch/sim/src/up_internal.h index 9b26f11041b..ef5263f2d69 100644 --- a/arch/sim/src/up_internal.h +++ b/arch/sim/src/up_internal.h @@ -262,7 +262,7 @@ void up_registerblockdevice(void); void simuart_start(void); int simuart_putc(int ch); -int simuart_getc(void); +int simuart_getc(bool block); bool simuart_checkc(void); void simuart_terminate(void); diff --git a/arch/sim/src/up_netdriver.c b/arch/sim/src/up_netdriver.c index bdd39ff2bca..3547cf0f507 100644 --- a/arch/sim/src/up_netdriver.c +++ b/arch/sim/src/up_netdriver.c @@ -171,6 +171,12 @@ void netdriver_loop(void) { FAR struct eth_hdr_s *eth; + /* Check for new frames. If so, then poll the network for new XMIT data */ + + net_lock(); + (void)devif_poll(&g_sim_dev, sim_txpoll); + net_unlock(); + /* netdev_read will return 0 on a timeout event and >0 on a data received event */ g_sim_dev.d_len = netdev_read((FAR unsigned char *)g_sim_dev.d_buf, diff --git a/arch/sim/src/up_simuart.c b/arch/sim/src/up_simuart.c index 777dc32e15b..a532839f854 100644 --- a/arch/sim/src/up_simuart.c +++ b/arch/sim/src/up_simuart.c @@ -42,6 +42,7 @@ #include #include #include +#include /**************************************************************************** * Pre-processor Definitions @@ -268,7 +269,7 @@ int simuart_putc(int ch) * Name: simuart_getc ****************************************************************************/ -int simuart_getc(void) +int simuart_getc(bool block) { int index; int ch; @@ -282,6 +283,12 @@ int simuart_getc(void) { /* Wait for a byte to become available */ + if (!block && (g_uarthead == g_uarttail)) + { + sched_unlock(); + return -EAGAIN; + } + while (g_uarthead == g_uarttail) { simuart_wait(); diff --git a/configs/b-l475e-iot01a/src/stm32_boot.c b/configs/b-l475e-iot01a/src/stm32_boot.c index a4a1b3cf58f..118a83fc33a 100644 --- a/configs/b-l475e-iot01a/src/stm32_boot.c +++ b/configs/b-l475e-iot01a/src/stm32_boot.c @@ -43,6 +43,7 @@ #include #include "up_arch.h" +#include "stm32l4_start.h" #include "b-l475e-iot01a.h" /************************************************************************************ @@ -50,16 +51,16 @@ ************************************************************************************/ /************************************************************************************ - * Name: stm32_boardinitialize + * Name: stm32l4_board_initialize * * Description: - * All STM32 architectures must provide the following entry point. This entry point - * is called early in the initialization -- after all memory has been configured - * and mapped but before any devices have been initialized. + * All STM32L4 architectures must provide the following entry point. This entry + * point is called early in the initialization -- after all memory has been + * configured and mapped but before any devices have been initialized. * ************************************************************************************/ -void stm32l4_boardinitialize(void) +void stm32l4_board_initialize(void) { #ifdef CONFIG_ARCH_LEDS /* Configure on-board LEDs if LED support has been selected. */ diff --git a/configs/nucleo-l432kc/include/board.h b/configs/nucleo-l432kc/include/board.h index 2d0c152e6fd..de5fdb345c1 100644 --- a/configs/nucleo-l432kc/include/board.h +++ b/configs/nucleo-l432kc/include/board.h @@ -243,7 +243,7 @@ extern "C" * Public Function Prototypes ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32L4 architectures must provide the following entry point. This entry point @@ -252,7 +252,7 @@ extern "C" * ************************************************************************************/ -void stm32l4_boardinitialize(void); +void stm32l4_board_initialize(void); #undef EXTERN #if defined(__cplusplus) diff --git a/configs/nucleo-l432kc/src/stm32_boot.c b/configs/nucleo-l432kc/src/stm32_boot.c index e460316949e..f4bc7c39456 100644 --- a/configs/nucleo-l432kc/src/stm32_boot.c +++ b/configs/nucleo-l432kc/src/stm32_boot.c @@ -64,7 +64,7 @@ ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32L4 architectures must provide the following entry point. This entry point @@ -73,7 +73,7 @@ * ************************************************************************************/ -void stm32l4_boardinitialize(void) +void stm32l4_board_initialize(void) { /* Configure on-board LEDs if LED support has been selected. */ diff --git a/configs/nucleo-l432kc/src/stm32_spi.c b/configs/nucleo-l432kc/src/stm32_spi.c index 731030f7edb..cb1732dbe2e 100644 --- a/configs/nucleo-l432kc/src/stm32_spi.c +++ b/configs/nucleo-l432kc/src/stm32_spi.c @@ -114,7 +114,7 @@ void stm32l4_spiinitialize(void) * are provided by common STM32 logic. To use this common SPI logic on your * board: * - * 1. Provide logic in stm32l4_boardinitialize() to configure SPI chip select + * 1. Provide logic in stm32l4_board_initialize() to configure SPI chip select * pins. * 2. Provide stm32l4_spi1/2select() and stm32l4_spi1/2status() functions in your * board-specific logic. These functions will perform chip selection and diff --git a/configs/nucleo-l452re/include/board.h b/configs/nucleo-l452re/include/board.h index 30e452dca75..2e2a85e993b 100644 --- a/configs/nucleo-l452re/include/board.h +++ b/configs/nucleo-l452re/include/board.h @@ -252,7 +252,7 @@ extern "C" * Public Function Prototypes ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32L4 architectures must provide the following entry point. This entry point @@ -261,7 +261,7 @@ extern "C" * ************************************************************************************/ -void stm32l4_boardinitialize(void); +void stm32l4_board_initialize(void); #undef EXTERN #if defined(__cplusplus) diff --git a/configs/nucleo-l452re/src/stm32_boot.c b/configs/nucleo-l452re/src/stm32_boot.c index 9e7c287303d..182a51df27b 100644 --- a/configs/nucleo-l452re/src/stm32_boot.c +++ b/configs/nucleo-l452re/src/stm32_boot.c @@ -53,7 +53,7 @@ ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32 architectures must provide the following entry point. This entry point @@ -62,7 +62,7 @@ * ************************************************************************************/ -void stm32l4_boardinitialize(void) +void stm32l4_board_initialize(void) { #ifdef CONFIG_ARCH_LEDS /* Configure on-board LEDs if LED support has been selected. */ diff --git a/configs/nucleo-l452re/src/stm32_spi.c b/configs/nucleo-l452re/src/stm32_spi.c index 02f17ca6078..7330f7e5dd5 100644 --- a/configs/nucleo-l452re/src/stm32_spi.c +++ b/configs/nucleo-l452re/src/stm32_spi.c @@ -117,7 +117,7 @@ void weak_function stm32l4_spiinitialize(void) * are provided by common STM32 logic. To use this common SPI logic on your * board: * - * 1. Provide logic in stm32l4_boardinitialize() to configure SPI chip select + * 1. Provide logic in stm32l4_board_initialize() to configure SPI chip select * pins. * 2. Provide stm32l4_spi1/2/3select() and stm32l4_spi1/2/3status() functions in your * board-specific logic. These functions will perform chip selection and diff --git a/configs/nucleo-l476rg/include/board.h b/configs/nucleo-l476rg/include/board.h index 490e5af9689..0cbecee0c59 100644 --- a/configs/nucleo-l476rg/include/board.h +++ b/configs/nucleo-l476rg/include/board.h @@ -249,7 +249,7 @@ extern "C" * Public Function Prototypes ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32L4 architectures must provide the following entry point. This entry point @@ -258,7 +258,7 @@ extern "C" * ************************************************************************************/ -void stm32l4_boardinitialize(void); +void stm32l4_board_initialize(void); #undef EXTERN #if defined(__cplusplus) diff --git a/configs/nucleo-l476rg/src/stm32_boot.c b/configs/nucleo-l476rg/src/stm32_boot.c index 2acb52ee62e..a8af6532065 100644 --- a/configs/nucleo-l476rg/src/stm32_boot.c +++ b/configs/nucleo-l476rg/src/stm32_boot.c @@ -64,7 +64,7 @@ ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32L4 architectures must provide the following entry point. This entry point @@ -73,7 +73,7 @@ * ************************************************************************************/ -void stm32l4_boardinitialize(void) +void stm32l4_board_initialize(void) { /* Configure on-board LEDs if LED support has been selected. */ diff --git a/configs/nucleo-l476rg/src/stm32_spi.c b/configs/nucleo-l476rg/src/stm32_spi.c index 6e45b6f76cc..5047ee3d0a1 100644 --- a/configs/nucleo-l476rg/src/stm32_spi.c +++ b/configs/nucleo-l476rg/src/stm32_spi.c @@ -126,7 +126,7 @@ void weak_function stm32l4_spiinitialize(void) * are provided by common STM32 logic. To use this common SPI logic on your * board: * - * 1. Provide logic in stm32l4_boardinitialize() to configure SPI chip select + * 1. Provide logic in stm32l4_board_initialize() to configure SPI chip select * pins. * 2. Provide stm32l4_spi1/2/3select() and stm32l4_spi1/2/3status() functions in your * board-specific logic. These functions will perform chip selection and diff --git a/configs/nucleo-l496zg/include/board.h b/configs/nucleo-l496zg/include/board.h index 7f4bc3b5afe..87f69f92d91 100644 --- a/configs/nucleo-l496zg/include/board.h +++ b/configs/nucleo-l496zg/include/board.h @@ -438,7 +438,7 @@ extern "C" ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32 architectures must provide the following entry point. This entry point @@ -447,7 +447,7 @@ extern "C" * ************************************************************************************/ -void stm32l4_boardinitialize(void); +void stm32l4_board_initialize(void); #undef EXTERN #if defined(__cplusplus) diff --git a/configs/nucleo-l496zg/src/stm32_boot.c b/configs/nucleo-l496zg/src/stm32_boot.c index 5cf32fbb227..ec2bff2d24e 100644 --- a/configs/nucleo-l496zg/src/stm32_boot.c +++ b/configs/nucleo-l496zg/src/stm32_boot.c @@ -53,7 +53,7 @@ ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32 architectures must provide the following entry point. This entry point @@ -62,7 +62,7 @@ * ************************************************************************************/ -void stm32l4_boardinitialize(void) +void stm32l4_board_initialize(void) { #ifdef CONFIG_ARCH_LEDS /* Configure on-board LEDs if LED support has been selected. */ diff --git a/configs/stm32l476-mdk/include/board.h b/configs/stm32l476-mdk/include/board.h index 39f0e861ef7..771b43e798d 100644 --- a/configs/stm32l476-mdk/include/board.h +++ b/configs/stm32l476-mdk/include/board.h @@ -135,7 +135,7 @@ extern "C" * Public Function Prototypes ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32L4 architectures must provide the following entry point. This entry @@ -144,7 +144,7 @@ extern "C" * ************************************************************************************/ -void stm32l4_boardinitialize(void); +void stm32l4_board_initialize(void); #undef EXTERN #if defined(__cplusplus) diff --git a/configs/stm32l476-mdk/src/stm32_boot.c b/configs/stm32l476-mdk/src/stm32_boot.c index 3d907d49bb7..55b3f6af75b 100644 --- a/configs/stm32l476-mdk/src/stm32_boot.c +++ b/configs/stm32l476-mdk/src/stm32_boot.c @@ -56,7 +56,7 @@ ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32L4 architectures must provide the following entry point. This entry point @@ -65,7 +65,7 @@ * ************************************************************************************/ -void stm32l4_boardinitialize(void) +void stm32l4_board_initialize(void) { /* Configure on-board LEDs if LED support has been selected. */ diff --git a/configs/stm32l476vg-disco/include/board.h b/configs/stm32l476vg-disco/include/board.h index ee28c35a06e..5713b402e8b 100644 --- a/configs/stm32l476vg-disco/include/board.h +++ b/configs/stm32l476vg-disco/include/board.h @@ -293,7 +293,7 @@ extern "C" * Public Function Prototypes ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32L4 architectures must provide the following entry point. This entry point @@ -302,7 +302,7 @@ extern "C" * ************************************************************************************/ -void stm32l4_boardinitialize(void); +void stm32l4_board_initialize(void); #undef EXTERN #if defined(__cplusplus) diff --git a/configs/stm32l476vg-disco/src/stm32_boot.c b/configs/stm32l476vg-disco/src/stm32_boot.c index e3711ec9bad..56723d783d4 100644 --- a/configs/stm32l476vg-disco/src/stm32_boot.c +++ b/configs/stm32l476vg-disco/src/stm32_boot.c @@ -56,7 +56,7 @@ ************************************************************************************/ /************************************************************************************ - * Name: stm32l4_boardinitialize + * Name: stm32l4_board_initialize * * Description: * All STM32L4 architectures must provide the following entry point. This entry point @@ -65,7 +65,7 @@ * ************************************************************************************/ -void stm32l4_boardinitialize(void) +void stm32l4_board_initialize(void) { /* Configure on-board LEDs if LED support has been selected. */ diff --git a/drivers/analog/adc.c b/drivers/analog/adc.c index be1682e3cda..4282494bf76 100644 --- a/drivers/analog/adc.c +++ b/drivers/analog/adc.c @@ -238,17 +238,27 @@ static ssize_t adc_read(FAR struct file *filep, FAR char *buffer, size_t buflen) ainfo("buflen: %d\n", (int)buflen); if (buflen % 5 == 0) - msglen = 5; + { + msglen = 5; + } else if (buflen % 4 == 0) - msglen = 4; + { + msglen = 4; else if (buflen % 3 == 0) - msglen = 3; + { + msglen = 3; + } else if (buflen % 2 == 0) - msglen = 2; + { + msglen = 2; + } else if (buflen == 1) - msglen = 1; + { + msglen = 1; + } else - msglen = 5; + { + msglen = 5; if (buflen >= msglen) { @@ -336,6 +346,7 @@ static ssize_t adc_read(FAR struct file *filep, FAR char *buffer, size_t buflen) *(int32_t *)&buffer[nread + 1] = msg->am_data; buffer[nread] = msg->am_channel; } + nread += msglen; /* Increment the head of the circular message buffer */ diff --git a/fs/vfs/fs_epoll.c b/fs/vfs/fs_epoll.c index 6678ae10f21..69cd50170dd 100644 --- a/fs/vfs/fs_epoll.c +++ b/fs/vfs/fs_epoll.c @@ -198,6 +198,7 @@ int epoll_wait(int epfd, FAR struct epoll_event *evs, int maxevents, */ FAR struct epoll_head *eph = (FAR struct epoll_head *)((intptr_t)epfd); + int counter; int rc; int i; @@ -219,13 +220,19 @@ int epoll_wait(int epfd, FAR struct epoll_event *evs, int maxevents, return rc; } - for (i = 0; i < rc; i++) + /* Iterate over non NULL event fds */ + + for (i = 0, counter = 0; i < rc && counter < eph->size; counter++) { - evs[i].data.fd = (pollevent_t)eph->evs[i].data.fd; - evs[i].events = (pollevent_t)eph->evs[i].revents; + if (eph->evs[counter].revents != 0) + { + evs[i].data.fd = eph->evs[counter].data.fd; + evs[i].events = eph->evs[counter].revents; + i += 1; + } } - return rc; + return i; } #endif /* CONFIG_DISABLE_POLL */ diff --git a/net/local/local_sockif.c b/net/local/local_sockif.c index 3bb225de708..bb8df5adf34 100644 --- a/net/local/local_sockif.c +++ b/net/local/local_sockif.c @@ -614,7 +614,7 @@ static int local_poll(FAR struct socket *psock, FAR struct pollfd *fds, { /* Perform the TCP/IP poll() teardown */ - return loal_pollteardown(psock, fds); + return local_pollteardown(psock, fds); } #endif /* HAVE_LOCAL_POLL */ } diff --git a/net/pkt/pkt_sockif.c b/net/pkt/pkt_sockif.c index c1af74ba93b..076149ba793 100644 --- a/net/pkt/pkt_sockif.c +++ b/net/pkt/pkt_sockif.c @@ -72,7 +72,7 @@ static int pkt_connect(FAR struct socket *psock, static int pkt_accept(FAR struct socket *psock, FAR struct sockaddr *addr, FAR socklen_t *addrlen, FAR struct socket *newsock); #ifndef CONFIG_DISABLE_POLL -static int pkt_poll(FAR struct socket *psock, +static int pkt_poll_local(FAR struct socket *psock, FAR struct pollfd *fds, bool setup); #endif static ssize_t pkt_send(FAR struct socket *psock, FAR const void *buf, @@ -97,7 +97,7 @@ const struct sock_intf_s g_pkt_sockif = pkt_connect, /* si_connect */ pkt_accept, /* si_accept */ #ifndef CONFIG_DISABLE_POLL - pkt_poll, /* si_poll */ + pkt_poll_local, /* si_poll */ #endif pkt_send, /* si_send */ pkt_sendto, /* si_sendto */ @@ -475,8 +475,8 @@ int pkt_listen(FAR struct socket *psock, int backlog) ****************************************************************************/ #ifndef CONFIG_DISABLE_POLL -static int pkt_poll(FAR struct socket *psock, FAR struct pollfd *fds, - bool setup) +static int pkt_poll_local(FAR struct socket *psock, FAR struct pollfd *fds, + bool setup) { return -ENOSYS; }