--- configure.orig 2020-10-01 22:15:40.000000000 +1000 +++ configure 2021-07-08 18:01:37.340544000 +1000 @@ -10079,7 +10079,7 @@ esac case "$target_os" in #( - freebsd*) : + bsdsunix*|freebsd*) : { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread should be enabled by default" >&5 $as_echo_n "checking whether pthread should be enabled by default... " >&6; } @@ -10090,7 +10090,7 @@ /* end confdefs.h. */ #include -#if __FreeBSD_version < 502102 +#if (defined(__FreeBSD_version) && __FreeBSD_version < 502102) && !defined(__BSDSUniX_version) #error pthread should be disabled on this platform #endif @@ -10670,7 +10670,7 @@ $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h ac_cv_sizeof_rlim_t=8 ;; #( - freebsd*) : + bsdsunix*|freebsd*) : LIBS="-lm $LIBS" ac_cv_func_getpeername=no ac_cv_func_getsockname=no @@ -22530,7 +22530,7 @@ case "$target_os" in #( - freebsd*) : + bsdsunix*|freebsd*) : $as_echo "#define BROKEN_CLOSE 1" >>confdefs.h @@ -27424,13 +27424,13 @@ XLDFLAGS="$XLDFLAGS -Wl,-E" LIBPATHFLAG=" -L%1\$-s" rb_cv_dlopen=yes ;; #( - freebsd*|dragonfly*) : + bsdsunix*|freebsd*|dragonfly*) : : ${LDSHARED='$(CC) -shared'} if test "$rb_cv_binary_elf" = yes; then : LDFLAGS="$LDFLAGS -rdynamic" - DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$@' + DLDFLAGS="$DLDFLAGS "'-Wl,-E' else @@ -27657,7 +27657,7 @@ fi case "$target_os" in #( - freebsd*) : + bsdsunix*|freebsd*) : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for procstat_open_sysctl in -lprocstat" >&5 $as_echo_n "checking for procstat_open_sysctl in -lprocstat... " >&6; } @@ -27811,7 +27811,7 @@ fi ;; #( - *-freebsd*|x86_64-netbsd*) : + *-bsdsunix*|*-freebsd*|x86_64-netbsd*) : for ac_header in execinfo.h do : @@ -28575,7 +28575,7 @@ libdir_basename="${libdir_basename}"${multiarch+'/${arch}'} case "$target_os" in #( - freebsd*|dragonfly*) : + bsdsunix*|freebsd*|dragonfly*) : ;; #( *) : @@ -28681,7 +28681,7 @@ fi ;; #( - freebsd*|dragonfly*) : + bsdsunix*|freebsd*|dragonfly*) : LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT).$(MAJOR)$(MINOR)' LIBRUBY_SONAME='$(LIBRUBY_SO)' @@ -29160,7 +29160,7 @@ fi case "${target_os}" in #( - freebsd*) : + bsdsunix*|freebsd*) : # FreeBSD's dtrace requires libelf LIBS="-lelf $LIBS" ;; #(