$OpenBSD: patch-common_include_kopano_platform_linux_h,v 1.8 2021/02/09 10:32:33 robert Exp $

Index: common/include/kopano/platform.linux.h
--- common/include/kopano/platform.linux.h.orig
+++ common/include/kopano/platform.linux.h
@@ -22,7 +22,11 @@
 #include <dlfcn.h>
 #include <cstddef>
 #include <libgen.h>
+#ifndef __OpenBSD__
 #include <byteswap.h>
+#else
+#include <stdarg.h>
+#endif
 #include <clocale>
 
 #define __STDC_FORMAT_MACROS
@@ -36,6 +40,10 @@
 #define UNUSED_VAR __attribute__((unused))
 #endif
 
+#ifdef __OpenBSD__
+#define POLLRDHUP 0
+#endif
+
 #include <cassert>
 #define _vsnprintf vsnprintf
 #ifdef HAVE_VSNPRINTF_L
@@ -382,6 +390,8 @@ extern KC_EXPORT void Sleep(unsigned int usec);
 /* because the flags are not used linux, they do not match the windows flags! */
 #define GPTR 0
 extern KC_EXPORT void *GlobalAlloc(unsigned int flags, unsigned int size);
+
+extern char **environ;
 
 } /* extern "C" */
 
