Add strange linker hack to fix asio
This commit is contained in:
@@ -22,6 +22,7 @@ set(headers
|
|||||||
|
|
||||||
set(sources
|
set(sources
|
||||||
src/espstrutils.cpp
|
src/espstrutils.cpp
|
||||||
|
src/linker_hacks.cpp
|
||||||
src/schedulertask.cpp
|
src/schedulertask.cpp
|
||||||
src/taskutils.cpp
|
src/taskutils.cpp
|
||||||
)
|
)
|
||||||
|
15
src/linker_hacks.cpp
Normal file
15
src/linker_hacks.cpp
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
// I dont know why but without this hack here the linker
|
||||||
|
// fails for asio and I could not fix it otherwise
|
||||||
|
|
||||||
|
extern "C" char *lwip_if_indextoname(unsigned int ifindex, char *ifname);
|
||||||
|
extern "C" unsigned int lwip_if_nametoindex(const char *ifname);
|
||||||
|
|
||||||
|
extern "C" char *if_indextoname(unsigned int ifindex, char *ifname)
|
||||||
|
{
|
||||||
|
return lwip_if_indextoname(ifindex, ifname);
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" unsigned int if_nametoindex(const char *ifname)
|
||||||
|
{
|
||||||
|
return lwip_if_nametoindex(ifname);
|
||||||
|
}
|
Reference in New Issue
Block a user