Skip to content

Commit

Permalink
Refs #19036: Solve build issue in windows
Browse files Browse the repository at this point in the history
Signed-off-by: elianalf <[email protected]>
  • Loading branch information
elianalf committed Aug 2, 2024
1 parent ef97318 commit 7d9d6b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/cpp/rtps/transport/shared_mem/SHMLocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class SHMLocator

if ((fastdds::dds::RETCODE_OK == SystemInfo::get_username(user_name)) && (user_name.length() < 16))
{
std::strcpy(reinterpret_cast<char*>(&locator.address[1]), user_name.c_str());
std::memcpy(&locator.address[1], user_name.c_str(), user_name.length());
}
else
{
Expand Down
5 changes: 1 addition & 4 deletions test/examples/xtypes_minimal.compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ services:
LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@
EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/hello_world@FILE_EXTENSION@
FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/hello_world/hello_world_profile.xml
network_mode: host
ipc: host

command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/hello_world@FILE_EXTENSION@ publisher --samples 10"
depends_on:
- xtypes-subscriber
Expand All @@ -91,8 +90,6 @@ services:
LD_LIBRARY_PATH: @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@
EXAMPLE_DIR: @PROJECT_BINARY_DIR@/examples/cpp/xtypes@FILE_EXTENSION@
FASTDDS_DEFAULT_PROFILES_FILE: @PROJECT_BINARY_DIR@/examples/cpp/xtypes/xtypes_minimal_profile.xml
network_mode: host
ipc: host
command: @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/xtypes@FILE_EXTENSION@ publisher --samples 10 --xml-type"
depends_on:
- xtypes-subscriber
Expand Down

0 comments on commit 7d9d6b3

Please sign in to comment.