1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
$NetBSD: patch-af,v 1.1 2005/03/17 15:23:57 cube Exp $
--- src/util.c.orig 2003-11-03 23:28:24.000000000 +0100
+++ src/util.c
@@ -1909,7 +1909,11 @@ GList *get_suffixes(int error_context, s
char **gq_ldap_explode_dn(const char *dn, int dummy)
{
int i, rc;
+#if LDAP_VENDOR_VERSION >= 20200
+ LDAPDN parts;
+#else
LDAPDN *parts;
+#endif
char **v = 0;
rc = ldap_str2dn(dn, &parts, LDAP_DN_FORMAT_LDAPV3);
@@ -1921,7 +1925,11 @@ char **gq_ldap_explode_dn(const char *dn
v = (char **) calloc((i + 2), sizeof(char*));
for( i = 0 ; parts[i] ; i++ ) {
+#if LDAP_VENDOR_VERSION >= 20200
+ ldap_rdn2str(parts[i], &v[i],
+#else
ldap_rdn2str(parts[0][i], &v[i],
+#endif
LDAP_DN_FORMAT_LDAPV3 | LDAP_DN_PRETTY );
}
return v;
|