mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 09:39:10 -04:00
This commit changes the approach used to override select function in FreeRTOS simulator. The previous approach relied on '--wrap', which is a feature of GNU linker that performs symbol substitution at link time. Sadly this feature is not present in macOS linker. The alternative solution is to define 'select' wrapper as a regular (exported) symbol, preventing it from being loaded from system libraries. To call the "real" select implementation we use dlsym function and find the function pointer at run time. This solution works on both Linux and macOS.