On FreeBSD, crypt is defined in unistd.h and crypt.h is not present. This patch allows cross builds for FreeBSD by determining whether to include crypt.h based on the i_crypt variable. It additionally adds unistd.h to the list of headers to include for testing whether crypt is available. Perl already includes unistd.h in all the places that use crypt.
On FreeBSD, crypt is defined in unistd.h and crypt.h is not present. This patch allows cross builds for FreeBSD by determining whether to include crypt.h based on the i_crypt variable. It additionally adds unistd.h to the list of headers to include for testing whether crypt is available. Perl already includes unistd.h in all the places that use crypt.