Khaled Blah writes:
I've searched for portable.h but couldn't find it in /usr/include or any of its subdirectories. I've also done "grep -r LDAP_VALID /usr/include/*" and that search did not return any results either.
Quite so. ldap-int.h is in the openldap source tree. portable.h is generated there by configure. Neither should be installed anywhere:
#include "<openldap source>/include/portable.h"
#include <openldap source>/libraries/libldap/ldap-int.h.