Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix insufficient memory allocation in ESP32 select_thread_loop
Building with ESP-IDF v5.4 emmits the folowing warning: ``` /__w/AtomVM/AtomVM/src/platforms/esp32/components/avm_sys/sys.c: In function 'select_thread_loop': /__w/AtomVM/AtomVM/src/platforms/esp32/components/avm_sys/sys.c:680:26: warning: allocation of insufficient size '0' for type 'struct pollfd' with size '8' [-Walloc-size] 680 | struct pollfd *fds = malloc(0); | ^~~~~~ ``` These changes fix the problem by allocating enough memory to hold the struct. Signed-off-by: Winford <winford@object.stream>
- Loading branch information