mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
f5cd3b7ff4
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.