net: sockets_offload: Fix build error with NO_OPTIMIZATIONS
When CONFIG_NO_OPTIMIZATIONS the compiler will not inline socket_offload_dns_is_enabled(), which means calls to socket_offload* remain, and the linker will fail with in function `zsock_getaddrinfo': undefined reference to `socket_offload_getaddrinfo' in function `zsock_freeaddrinfo': undefined reference to `socket_offload_freeaddrinfo' Instead of relaying on that function being inlined and the if'ed code being removed, let's just use the preprocessor. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
a3aa06521e
commit
dc24583858
1 changed files with 1 additions and 4 deletions
|
@ -67,10 +67,7 @@ void socket_offload_dns_enable(bool enable);
|
|||
#if defined(CONFIG_NET_SOCKETS_OFFLOAD)
|
||||
bool socket_offload_dns_is_enabled(void);
|
||||
#else
|
||||
static inline bool socket_offload_dns_is_enabled(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#define socket_offload_dns_is_enabled() false
|
||||
#endif /* defined(CONFIG_NET_SOCKETS_OFFLOAD) */
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue