From f4e8ba0bb738339fb448d07a455c1c5963b51a23 Mon Sep 17 00:00:00 2001 From: "andrey.bychkov" Date: Thu, 19 Jun 2025 18:22:00 +0300 Subject: [PATCH 1/2] Fix cmake module path --- CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ffd682b3..9cb07ce6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,9 +45,7 @@ ExternalProject_Add(cmake set(GIT_CMAKE_DIR "${CMAKE_CURRENT_BINARY_DIR}/cmake-src") endif() -if ("x${CMAKE_MODULE_PATH}" STREQUAL "x") - set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") -endif() +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") if (NOT "x${GIT_CMAKE_DIR}" STREQUAL "x") list(APPEND CMAKE_MODULE_PATH "${GIT_CMAKE_DIR}") endif() @@ -117,7 +115,6 @@ macro(pip_module NAME LIBS LABEL INCLUDES SOURCES MSG) file(GLOB_RECURSE ASRC "${SOURCES}/*.cpp" "${SOURCES}/*.c") list(APPEND CPPS ${ASRC}) endif() - #message("${NAME} HS = ${HS}") list(APPEND HDRS ${HS}) list(APPEND PHDRS ${PHS}) -- 2.43.0 From 98764b9ee03f84e451e1857d36dab959d03b4385 Mon Sep 17 00:00:00 2001 From: "andrey.bychkov" Date: Tue, 24 Jun 2025 18:14:23 +0300 Subject: [PATCH 2/2] fix get mtu --- libs/main/io_devices/piethernet.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/main/io_devices/piethernet.cpp b/libs/main/io_devices/piethernet.cpp index 69cc2f30..89634d5f 100644 --- a/libs/main/io_devices/piethernet.cpp +++ b/libs/main/io_devices/piethernet.cpp @@ -1243,9 +1243,12 @@ PIEthernet::InterfaceList PIEthernet::interfaces() { # else if (s != -1) { struct ifreq ir; - strcpy(ir.ifr_name, cif->ifa_name); + memset(&ir, 0, sizeof(ir)); + strncpy(ir.ifr_name, cif->ifa_name, sizeof(ir.ifr_name)); if (ioctl(s, SIOCGIFHWADDR, &ir) == 0) { ci.mac = macFromBytes(PIByteArray(ir.ifr_hwaddr.sa_data, 6)); + } + if (ioctl(s, SIOCGIFMTU, &ir) == 0) { ci.mtu = ir.ifr_mtu; } } -- 2.43.0