There are defined some kernel-specific macroses, e.g. IPPROTO_DIVERT, and some FreeBSD software expect to find it there. But on Debian this header provided by libc, not kfreebsd-kernel-header. And this header could only been found in kfreebsd-headers-$(version) which makes difficult to build-depend on it. I think this should be fixed some way to allow IPPROTO_DIVERT usage in correct way without hacks in sources.
Please, could you verify whether adding line #define IPPROTO_DIVERT 258 /* divert pseudo-protocol */ into /usr/include/bits/in.h fixes all your needs ? Cheers Petr