mirror of
https://git.freebsd.org/ports.git
synced 2025-06-09 14:50:31 -04:00
This is an initial attempt to add Samba to the FreeBSD after major rewrite of the VFS code in the upstream. Most of the port development is now carried in: https://gitlab.com/samba-freebsd Due to the way how new Samba VFS code is written there is a constrain that Samba 4.14+ can run only on FreeBSD 13.1+, as it requires support of the `nodup` option for the `fdesc` file system, as well as it's presence in the system in general. https://gitlab.com/samba-freebsd/-/wikis/The-New-VFS I'd like to thank CyberSecure Pty Ltd. company for their supoort of the port development and Andrew Walker from iXsystems Inc. for the patches he created and made available for the Samba4 on TrueNAS. PR: 263874
29 lines
1.1 KiB
Diff
29 lines
1.1 KiB
Diff
From 2b3ee747cdf83b80d07aaf1b261956bc9894ff36 Mon Sep 17 00:00:00 2001
|
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
|
Date: Thu, 8 Sep 2022 00:06:37 +0200
|
|
Subject: [PATCH 16/28] Make ldb_schema_attribute_compare() a stable
|
|
comparision function.
|
|
|
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
|
---
|
|
lib/ldb/ldb_key_value/ldb_kv_cache.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/lib/ldb/ldb_key_value/ldb_kv_cache.c b/lib/ldb/ldb_key_value/ldb_kv_cache.c
|
|
index 4a3c9f29020..cb200aeb9ba 100644
|
|
--- a/lib/ldb/ldb_key_value/ldb_kv_cache.c
|
|
+++ b/lib/ldb/ldb_key_value/ldb_kv_cache.c
|
|
@@ -92,7 +92,9 @@ static int ldb_schema_attribute_compare(const void *p1, const void *p2)
|
|
{
|
|
const struct ldb_schema_attribute *sa1 = (const struct ldb_schema_attribute *)p1;
|
|
const struct ldb_schema_attribute *sa2 = (const struct ldb_schema_attribute *)p2;
|
|
- return ldb_attr_cmp(sa1->name, sa2->name);
|
|
+ int res = ldb_attr_cmp(sa1->name, sa2->name);
|
|
+
|
|
+ return (res) ? res : (sa1->flags > sa2->flags) ? 1 : (sa1->flags < sa2->flags) ? -1 : 0;
|
|
}
|
|
|
|
/*
|
|
--
|
|
2.37.1
|
|
|