I would say the calling code is at fault here. At least notionally, the profile library is a dependency of libkrb5 and not the other way around, so profile functions should not use krb5 types.