--- configure.orig	2021-05-10 03:57:57.000000000 -0700
+++ configure	2021-11-28 20:55:00.866132000 -0800
@@ -35189,7 +35189,7 @@
 ##
 
 BUILD_HELPER="NIS"
-for ac_header in sys/types.h rpc/rpc.h rpcsvc/ypclnt.h rpcsvc/yp_prot.h crypt.h
+for ac_header in sys/types.h rpc/rpc.h rpcsvc/ypclnt.h rpcsvc/yp_prot.h rpcsvc/crypt.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
@@ -35204,8 +35204,10 @@
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
-else
-  BUILD_HELPER=""
+# XXX: On FreeBSD we have to do this to make NIS work
+# until https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188247
+# is resolved.
+  BUILD_HELPER="NIS"
 fi
 
 done
@@ -35678,7 +35680,7 @@
 
   # unconditionally requires crypt(3), for now
   if test "x$ac_cv_func_crypt" != "x"; then
-    for ac_header in unistd.h crypt.h shadow.h
+    for ac_header in unistd.h rpcsvc/crypt.h shadow.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -38456,7 +38458,7 @@
   arpa/nameser.h \
   assert.h \
   bstring.h \
-  crypt.h \
+  rpcsvc/crypt.h \
   ctype.h \
   direct.h \
   errno.h \
@@ -38664,6 +38666,7 @@
 #include <netinet/ip.h>
 #endif
 #if HAVE_NETINET_IP_COMPAT_H
+#include <net/if.h>	/* IFNAMSIZ */
 #include <netinet/ip_compat.h>
 #endif
 #if HAVE_NETINET_IP_FIL_H
@@ -39964,6 +39967,7 @@
 
 ac_fn_cxx_check_type "$LINENO" "cpu_set_t" "ac_cv_type_cpu_set_t" "
 #if HAVE_SCHED_H
+#define _WITH_CPU_SET_T
 #include <sched.h>
 #endif
 
@@ -42711,6 +42715,7 @@
 #     include <sys/ioccom.h>
 #     include <netinet/in.h>
 
+#     include <net/if.h>	/* IFNAMSIZ */
 #     include <netinet/ip_compat.h>
 #     include <netinet/ip_fil.h>
 #     include <netinet/ip_nat.h>
@@ -42741,6 +42746,7 @@
 #       include <sys/ioccom.h>
 #       include <netinet/in.h>
 #undef minor_t
+#       include <net/if.h>	/* IFNAMSIZ */
 #       include <netinet/ip_compat.h>
 #       include <netinet/ip_fil.h>
 #       include <netinet/ip_nat.h>
@@ -42785,6 +42791,7 @@
 	ip_fil_compat.h \
 	ip_fil.h \
 	ip_nat.h \
+	net/if.h \
 	netinet/ip_compat.h \
 	netinet/ip_fil_compat.h \
 	netinet/ip_fil.h \
@@ -42814,6 +42821,7 @@
 #if HAVE_IP_COMPAT_H
 #include <ip_compat.h>
 #elif HAVE_NETINET_IP_COMPAT_H
+#include <net/if.h>	/* IFNAMSIZ */
 #include <netinet/ip_compat.h>
 #endif
 #if HAVE_IP_FIL_H