From ed2e7eaefef0ed65dae70ba809b8a0225d5eee15 Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Mon, 29 Jan 2024 15:51:19 +0100 Subject: [PATCH] doc: releases: migration-guide: 3.6: Add note on SOURCE macros Warn users about the SOURCE macros not being defined globally anymore and them needed to set them if they need them. Signed-off-by: Alberto Escolar Piedras --- doc/releases/migration-guide-3.6.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/releases/migration-guide-3.6.rst b/doc/releases/migration-guide-3.6.rst index d8a4c3facbd..e44293b570d 100644 --- a/doc/releases/migration-guide-3.6.rst +++ b/doc/releases/migration-guide-3.6.rst @@ -26,6 +26,16 @@ Build System * The deprecated ``prj_.conf`` Kconfig file support has been removed, projects that use this should switch to using board Kconfig fragments instead (``boards/.conf``). +* Until now ``_POSIX_C_SOURCE``, ``_XOPEN_SOURCE``, and ``_XOPEN_SOURCE_EXTENDED`` were defined + globally when building for the native (``ARCH_POSIX``) targets, and ``_POSIX_C_SOURCE`` when + building with PicolibC. Since this release, these are set only for the files that need them. + If your library or application needed this, you may start getting an "implicit declaration" + warning for functions whose prototypes are only exposed if one of these is defined. + If so, you can fix it by defining the corresponding macro in your C source file before any + include, or by adding the equivalent of + ``target_compile_definitions(app PRIVATE _POSIX_C_SOURCE=200809L)`` to your application + or ``zephyr_library_compile_definitions(_POSIX_C_SOURCE=200809L)`` to your library. + Kernel ======