Page 1 of 1

Required implementation of newlib for asio (sys/poll.h and net/if.h)

Posted: Fri Feb 08, 2019 4:15 pm
by henrix
Hello,
if_indextoname
I'm trying to integrate an external library which is based on asio.
When I compile the project, I get undefined references for the following function declarations:

Code: Select all

unsigned int if_nametoindex(const char *ifname);

Code: Select all

char *if_indextoname(unsigned int ifindex, char *ifname);

Code: Select all

int poll(struct pollfd *fds, nfds_t nfds, int timeout);
In esp-idf I've only found the declarations in newlib, but no implementations.
Do I understand correctly, that these functions are not implemented yet or is this a linker problem?
If it's not implemented, can somebody help how to port the poll function to esp-idf?
if_nametoindex and if_indextoname can be easily implemented or mocked via esp-idf I think.

Thanks!