--- build-aux/reloc-ldflags.orig	2022-02-12 07:28:36.000000000 -0500
+++ build-aux/reloc-ldflags	2023-01-10 23:15:01.455606000 -0500
@@ -107,7 +107,7 @@
     case "$host_os" in
       # At least some versions of FreeBSD, DragonFly, and OpenBSD need the
       # linker option "-z origin". See <https://lekensteyn.nl/rpath.html>.
-      freebsd* | dragonfly* | openbsd*)
+      midnightbsd* | freebsd* | dragonfly* | openbsd*)
         rpath_options="-Wl,-z,origin $rpath_options" ;;
     esac
     echo "$rpath_options"
