OS: AIX 5.3 gcc: 4.0.0 Error when trying to compile pdb_ldap.c: Compiling passdb/pdb_ldap.c passdb/pdb_ldap.c: In function 'ldapsam_get_new_rid': passdb/pdb_ldap.c:4732: error: incompatible types in assignment passdb/pdb_ldap.c: In function 'pdb_init_ldapsam': passdb/pdb_ldap.c:6243: error: incompatible types in assignment The following command failed: gcc -I. -I/usr/local/samba-3.2.4/source -O -D_SAMBA_BUILD_=3 -I/usr/local/samb a-3.2.4/source/iniparser/src -Iinclude -I./include -I. -I. -I./lib/replace -I./ lib/talloc -I./lib/tdb/include -I./libaddns -I./librpc -DHAVE_CONFIG_H -Iinclud e -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./lib addns -I./librpc -I./popt -DLDAP_DEPRECATED -I/include -I/usr/local/samba-3.2. 4/source/lib -D_SAMBA_BUILD_=3 -O2 -c passdb/pdb_ldap.c -o passdb/pdb_ldap.o passdb/pdb_ldap.c line 4732: status = smbldap_search_domain_info(smbldap_state, &result, get_global_sam_name(), False); smbldap_search_domain_info() is defined in smbldap_util.c but not declared before pdb_ldap.c tries to use it. To fix, I added to pdb_ldap.c (just before get_userattr_key2string() ) : NTSTATUS smbldap_search_domain_info(struct smbldap_state *ldap_state, LDAPMessage ** result, const char *domain_name, bool try_add);
in 3.2 there was smbldap_search_domain_info not prototyped in a header file which might cause this. But it is since 3.3 and later versions. 3.2 is too old to fix things like that, people should use newer versions.