$OpenBSD: patch-src_util_cpp,v 1.1.1.1 2021/01/03 10:15:11 jca Exp $

Index: src/util.cpp
--- src/util.cpp.orig
+++ src/util.cpp
@@ -16,7 +16,11 @@
 
 // clang-format off
 // Dont't remove `format off`, it prevent reordering of win-includes.
-#define _POSIX_C_SOURCE 200112L // For stat from stat/stat.h and fseeko() (POSIX extensions).
+
+#ifndef __OpenBSD__
+#  define _POSIX_C_SOURCE 200112L // For stat from stat/stat.h and fseeko() (POSIX extensions).
+#endif
+
 #ifdef _WIN32
 #  ifndef WIN32_LEAN_AND_MEAN
 #    define WIN32_LEAN_AND_MEAN
@@ -31,6 +35,8 @@
 #  include <direct.h>
 #  include <winbase.h>
 #  undef interface  // This is also important because of reasons
+#elif defined(__OpenBSD__)
+#  include <limits.h>
 #else
 #  define _XOPEN_SOURCE 600 // For PATH_MAX from limits.h (SUSv2 extension) 
 #  include <limits.h>
