aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/libdnf/files/patch-libdnf_utils_utils.cpp
diff options
context:
space:
mode:
authorLexi Winter <ivy@FreeBSD.org>2025-12-01 03:19:41 +0000
committerLexi Winter <ivy@FreeBSD.org>2025-12-01 03:19:41 +0000
commit2e80774d0b20d167bc0a9e2b63dafbfb171c0d22 (patch)
tree25f0138e1af8902b92dacc8cce09b267447c17db /sysutils/libdnf/files/patch-libdnf_utils_utils.cpp
parentf85f2b2d6e5b7ed869376eb4b180c3a74a5c5da9 (diff)
parent1a30da80670973368b399f2b01fe9c04b91a1273 (diff)
Merge remote-tracking branch 'freebsd/main' into lf/mainlf/main
Diffstat (limited to 'sysutils/libdnf/files/patch-libdnf_utils_utils.cpp')
-rw-r--r--sysutils/libdnf/files/patch-libdnf_utils_utils.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/sysutils/libdnf/files/patch-libdnf_utils_utils.cpp b/sysutils/libdnf/files/patch-libdnf_utils_utils.cpp
new file mode 100644
index 000000000000..6ec69f656c5b
--- /dev/null
+++ b/sysutils/libdnf/files/patch-libdnf_utils_utils.cpp
@@ -0,0 +1,24 @@
+--- libdnf/utils/utils.cpp.orig 2025-11-25 05:02:56 UTC
++++ libdnf/utils/utils.cpp
+@@ -308,10 +308,10 @@ std::vector<std::string> createSortedFileList(
+ if (path[strlen(path)-1] == '/') {
+ continue;
+ }
+- auto * path_fname = basename(path);
++ auto * path_fname = g_basename(path);
+ bool found{false};
+ for (const auto & path_in_list : paths) {
+- if (strcmp(path_fname, basename(path_in_list.c_str())) == 0) {
++ if (strcmp(path_fname, g_basename(path_in_list.c_str())) == 0) {
+ found = true;
+ break;
+ }
+@@ -325,7 +325,7 @@ std::vector<std::string> createSortedFileList(
+
+ // sort all drop-in configuration files alphabetically by their names
+ std::sort(paths.begin(), paths.end(), [](const std::string & p1, const std::string & p2) {
+- return strcmp(basename(p1.c_str()), basename(p2.c_str())) < 0;
++ return strcmp(g_basename(p1.c_str()), g_basename(p2.c_str())) < 0;
+ });
+
+ return paths;