This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 178334b1cadc55620f151d402572f5b006ab94c8
Author: haopengxiang <[email protected]>
AuthorDate: Wed Mar 4 10:52:08 2026 +0800

    openamp/open-amp.cmake: rename safe_strcpy like the Make build
    
    open-amp.defs builds open-amp with -Dsafe_strcpy=openamp_safe_strcpy so
    its helper cannot clash with another library's safe_strcpy, but
    open-amp.cmake does not, and such a link fails with "multiple definition
    of safe_strcpy". Add the same rename to the CMake build.
    
    Signed-off-by: haopengxiang <[email protected]>
---
 openamp/open-amp.cmake | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/openamp/open-amp.cmake b/openamp/open-amp.cmake
index 023d91462e6..61dde70a8fc 100644
--- a/openamp/open-amp.cmake
+++ b/openamp/open-amp.cmake
@@ -101,6 +101,9 @@ endif()
 
 add_compile_definitions(elf_load=remoteproc_elf_load)
 
+# avoid multiple definitions in other file
+add_compile_definitions(safe_strcpy=openamp_safe_strcpy)
+
 if(CONFIG_OPENAMP_VIRTIO_DEVICE_SUPPORT)
   add_compile_definitions(VIRTIO_DEVICE_SUPPORT=1)
 else()

Reply via email to