Trying to compile 3.0.21a on IRIX 6.5.27/MIPSPro 7.4.4m. A recent
OpenLDAP is installed (2.2.28), and 3.0.20a compiles fine. Only
relevant difference between those two versions for libads/ldap.c is
this chunk (lines with '-' are new in 3.0.21a version):

*** 1799,1809 ****
void *res, *msg;
char *hostnameDN, *host;
int rc;
- LDAPControl ldap_control;
- LDAPControl * pldap_control[] = {&ldap_control, 0};
-
- memset(&ldap_control, 0, sizeof(LDAPControl));
- ldap_control.ldctl_oid = (char *)LDAP_SERVER_TREE_DELETE_OID;

/* hostname must be lowercase */
host = SMB_STRDUP(hostname);
--- 1785,1790 ----

FYI, 3.0.21 and 3.0.21a are identical for this file.
The compile error is this:
cc-1028 cc: ERROR File = libads/ldap.c, Line = 1803
The expression used must have a constant value.

LDAPControl * pldap_control[] = {&ldap_control, 0};
^

I made the following change, which allows it to compile. Is this an OK
change?
*** libads/ldap.c.orig Tue Jan 03 14:25:25 EST 2006
--- libads/ldap.c Tue Jan 03 14:31:01 EST 2006
***************
*** 1800,1806 ****
char *hostnameDN, *host;
int rc;
LDAPControl ldap_control;
! LDAPControl * pldap_control[] = {&ldap_control, 0};

memset(&ldap_control, 0, sizeof(LDAPControl));
ldap_control.ldctl_oid = (char *)LDAP_SERVER_TREE_DELETE_OID;
--- 1800,1809 ----
char *hostnameDN, *host;
int rc;
LDAPControl ldap_control;
! LDAPControl * pldap_control[2];
!
! pldap_control[0] = &ldap_control;
! pldap_control[1] = 0;

memset(&ldap_control, 0, sizeof(LDAPControl));
ldap_control.ldctl_oid = (char *)LDAP_SERVER_TREE_DELETE_OID;


Cheers,
Martin