Index: src/util.c
--- src/util.c.orig
+++ src/util.c
@@ -49,7 +49,7 @@ void *xcalloc(size_t nmemb, size_t size) {
 }
 
 void *xreallocarray(void *ptr, size_t nmemb, size_t size) {
-#if defined(__GLIBC__) && (defined(_DEFAULT_SOURCE) || defined(_GNU_SOURCE))
+#if defined(__OpenBSD__)
   void *const res = reallocarray(ptr, nmemb, size);
 #else
   size_t total = nmemb * size;
