tests/net coap_client: Define _POSIX_C_SOURCE

This test uses functions and types which are extensions to
the C library. Let's explicity select one of the extensions
which includes it instead of relaying on somebody having
set it for this file somewhere else.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras 2023-12-28 17:53:47 +01:00 committed by Anas Nashif
parent 4e869ad9f8
commit c9a1c25dcb

View file

@ -16,6 +16,8 @@ target_sources(app PRIVATE ${ZEPHYR_BASE}/subsys/net/lib/coap/coap.c)
target_include_directories(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
target_include_directories(app PRIVATE ${ZEPHYR_BASE}/include/)
target_compile_definitions(app PRIVATE _POSIX_C_SOURCE=200809L)
add_compile_definitions(CONFIG_NET_SOCKETS_POLL_MAX=3)
add_compile_definitions(CONFIG_COAP_CLIENT=y)
add_compile_definitions(CONFIG_COAP_CLIENT_BLOCK_SIZE=256)