I just built Heimdal 0.6 with OpenLDAP (2.1.22) support on a Solaris 7 machine. However, I had to add the following to lib/hdb/hdb_locl.h to get it to compile (it complained about ULONG_MAX not being defined):
Compiler used was GCC 3.0.4, Solaris kernel rev. "Generic_106541-23". I don't know if this is a candidate for including in the source (maybe it actually works with a different version of gcc or a newer Solaris), but there it is anyway.
Please note that I have no idea whether it actually works yet, it's just compiled and linked OK (sorry).
Anyone else had similar experiences building Heimdal 0.6 on Solaris?