From 917ba83c38dfa2c18c44b20b2d5203532f576afe Mon Sep 17 00:00:00 2001 From: Lars Erik Wik Date: Wed, 22 Apr 2026 11:05:12 +0200 Subject: [PATCH 1/3] Bumped libntech to master Signed-off-by: Lars Erik Wik --- libntech | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libntech b/libntech index b1d4fd336c..e972743ee1 160000 --- a/libntech +++ b/libntech @@ -1 +1 @@ -Subproject commit b1d4fd336c221da141fb4e4b535ebffe2b186d3d +Subproject commit e972743ee1ecb29c36573af7dd67734ee59c56ce From dce0ba9a5b818127823772f954562f1fb1d82485 Mon Sep 17 00:00:00 2001 From: Victor Moene Date: Wed, 25 Mar 2026 14:02:19 +0100 Subject: [PATCH 2/3] Added trailing sep in acceptance tests Ticket: CFE-4623 (cherry picked from commit ac328df8201736b236ab0263f352c1bc2f318364) Signed-off-by: Lars Erik Wik --- examples/findfiles.cf | 2 +- tests/acceptance/01_vars/02_functions/findfiles.cf | 8 ++++---- .../acceptance/01_vars/02_functions/findfiles_up.cf | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/findfiles.cf b/examples/findfiles.cf index 723aea9d13..1ef73683de 100644 --- a/examples/findfiles.cf +++ b/examples/findfiles.cf @@ -40,6 +40,6 @@ bundle agent run ############################################################################### #+begin_src example_output #@ ``` -#@ R: All files that match '/[tT][mM][pP]' = /tmp +#@ R: All files that match '/[tT][mM][pP]' = /tmp/ #@ ``` #+end_src diff --git a/tests/acceptance/01_vars/02_functions/findfiles.cf b/tests/acceptance/01_vars/02_functions/findfiles.cf index 978e2ea591..2827d45871 100644 --- a/tests/acceptance/01_vars/02_functions/findfiles.cf +++ b/tests/acceptance/01_vars/02_functions/findfiles.cf @@ -74,15 +74,15 @@ bundle agent check { vars: !windows:: - "expected[a]" string => "$(G.testdir)/a,$(G.testdir)/d,$(G.testdir)/g"; - "expected[b]" string => "$(G.testdir)/a,$(G.testdir)/bc,$(G.testdir)/d,$(G.testdir)/g,$(G.testdir)/klm,$(G.testdir)/tu"; + "expected[a]" string => "$(G.testdir)/a,$(G.testdir)/d/,$(G.testdir)/g/"; + "expected[b]" string => "$(G.testdir)/a,$(G.testdir)/bc,$(G.testdir)/d/,$(G.testdir)/g/,$(G.testdir)/klm/,$(G.testdir)/tu/"; - "expected[c]" string => "$(G.testdir)/d/e,$(G.testdir)/g/h"; + "expected[c]" string => "$(G.testdir)/d/e/,$(G.testdir)/g/h/"; "expected[d]" string => "$(G.testdir)/a,$(G.testdir)/bc"; "expected[e]" string => ""; "expected[f]" string => "$(G.testdir)/tu/*"; - "expected[g]" string => "$(G.testdir)/a,$(G.testdir)/bc,$(G.testdir)/d,$(G.testdir)/g,$(G.testdir)/klm,$(G.testdir)/tu,$(G.testdir)/d/e,$(G.testdir)/g/h,$(G.testdir)/klm/nop,$(G.testdir)/tu/*,$(G.testdir)/d/e/f,$(G.testdir)/g/h/i,$(G.testdir)/klm/nop/qrs,$(G.testdir)/g/h/i/j"; + "expected[g]" string => "$(G.testdir)/a,$(G.testdir)/bc,$(G.testdir)/d/,$(G.testdir)/g/,$(G.testdir)/klm/,$(G.testdir)/tu/,$(G.testdir)/d/e/,$(G.testdir)/g/h/,$(G.testdir)/klm/nop/,$(G.testdir)/tu/*,$(G.testdir)/d/e/f,$(G.testdir)/g/h/i/,$(G.testdir)/klm/nop/qrs,$(G.testdir)/g/h/i/j"; "expected[h]" string => "$(G.testdir)/g/h/i/j"; windows:: "expected[a]" string => "$(G.testdir)\\a,$(G.testdir)\\d,$(G.testdir)\\g"; diff --git a/tests/acceptance/01_vars/02_functions/findfiles_up.cf b/tests/acceptance/01_vars/02_functions/findfiles_up.cf index f05fcc72cc..98c2a564bd 100755 --- a/tests/acceptance/01_vars/02_functions/findfiles_up.cf +++ b/tests/acceptance/01_vars/02_functions/findfiles_up.cf @@ -74,12 +74,12 @@ bundle agent check ); "c3" expression => and( - strcmp("$(G.testdir)\\core\\libntech\\.git", "$(test.t3[0])"), - strcmp("$(G.testdir)\\core\\.git", "$(test.t3[1])") + strcmp("$(G.testdir)\\core\\libntech\\.git\\", "$(test.t3[0])"), + strcmp("$(G.testdir)\\core\\.git\\", "$(test.t3[1])") ); "c4" expression => and( - strcmp("$(G.testdir)\\core\\libntech\\.git", "$(test.t4[0])"), + strcmp("$(G.testdir)\\core\\libntech\\.git\\", "$(test.t4[0])"), not(isvariable("test.t4[1]")) ); "c5" @@ -106,12 +106,12 @@ bundle agent check ); "c3" expression => and( - strcmp("$(G.testdir)/core/libntech/.git", "$(test.t3[0])"), - strcmp("$(G.testdir)/core/.git", "$(test.t3[1])") + strcmp("$(G.testdir)/core/libntech/.git/", "$(test.t3[0])"), + strcmp("$(G.testdir)/core/.git/", "$(test.t3[1])") ); "c4" expression => and( - strcmp("$(G.testdir)/core/libntech/.git", "$(test.t4[0])"), + strcmp("$(G.testdir)/core/libntech/.git/", "$(test.t4[0])"), not(isvariable("test.t4[1]")) ); "c5" From ef03a0cd2d5a6e8a0141ad1c0446efc163010633 Mon Sep 17 00:00:00 2001 From: Lars Erik Wik Date: Mon, 9 Mar 2026 17:42:11 +0100 Subject: [PATCH 3/3] Fix MinGW cross-compilation: ws2_32 linkage and snprintf C99 detection When cross-compiling for MinGW with GCC 13 / mingw-w64 v11: 1. AC_SEARCH_LIBS(setsockopt, socket) didn't find setsockopt because on MinGW it lives in ws2_32, not socket. This caused AC_REPLACE_FUNCS to compile replacement inet_ntop/inet_pton that conflict with the MinGW-w64 declarations (socklen_t vs size_t parameter types). Fix: search [socket ws2_32] so -lws2_32 is in LIBS. 2. HW_FUNC_VSNPRINTF/HW_FUNC_SNPRINTF use AC_RUN_IFELSE to test C99 compliance, which can't execute when cross-compiling, defaulting to "no". This caused #define vfprintf rpl_vfprintf etc., which conflicts with mingw-w64 v11 inline stdio functions. Fix: default to C99-compliant for mingw* targets in cross-compile. Ticket: ENT-13766 Co-Authored-By: Claude Opus 4.6 (cherry picked from commit 99934d5b17f6d9f7d75f5689ccc8fc663455f7a9) --- configure.ac | 2 +- m4/snprintf.m4 | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 431a33c331..da620aad8d 100644 --- a/configure.ac +++ b/configure.ac @@ -1152,7 +1152,7 @@ dnl dnl Various functions dnl -AC_SEARCH_LIBS(setsockopt, socket) +AC_SEARCH_LIBS(setsockopt, [socket ws2_32]) AC_SEARCH_LIBS(gethostent, nsl) AC_CHECK_FUNCS(socket) diff --git a/m4/snprintf.m4 b/m4/snprintf.m4 index eb16c7f8f9..85bd421965 100644 --- a/m4/snprintf.m4 +++ b/m4/snprintf.m4 @@ -135,7 +135,9 @@ AC_DEFUN([HW_FUNC_VSNPRINTF], return 1;]])], [hw_cv_func_vsnprintf_c99=yes], [hw_cv_func_vsnprintf_c99=no], - [hw_cv_func_vsnprintf_c99=no])])], + [AS_CASE([$host_os], + [mingw*], [hw_cv_func_vsnprintf_c99=yes], + [hw_cv_func_vsnprintf_c99=no])])])], [hw_cv_func_snprintf_c99=no]) AS_IF( [test "$hw_cv_func_vsnprintf_c99" = yes], @@ -178,7 +180,9 @@ AC_DEFUN([HW_FUNC_SNPRINTF], return 1;]])], [hw_cv_func_snprintf_c99=yes], [hw_cv_func_snprintf_c99=no], - [hw_cv_func_snprintf_c99=no])])], + [AS_CASE([$host_os], + [mingw*], [hw_cv_func_snprintf_c99=yes], + [hw_cv_func_snprintf_c99=no])])])], [hw_cv_func_snprintf_c99=no]) AS_IF( [test "$hw_cv_func_snprintf_c99" = yes],