It appears that ldap_open is considered a deprecated interface and we call it in source/libads/ldap.c. On a 64 bit system that causes a problem because there is no prototype for the function so we get a mismatch on the return size.