Skip to content

Conversation

@rlubos
Copy link
Contributor

@rlubos rlubos commented Jun 23, 2025

Cherry-pick fix for native_sim builds with optimizations disabled.

…TIONS

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 <[email protected]>
(cherry picked from commit dc24583)
Signed-off-by: Robert Lubos <[email protected]>
@sonarqubecloud
Copy link

@rlubos rlubos merged commit 21e025e into nrfconnect:main Jun 24, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants