$OpenBSD: patch-provider_server_ECServer_cpp,v 1.32 2016/04/20 18:38:41 robert Exp $
--- provider/server/ECServer.cpp.orig	Wed Apr 20 13:13:54 2016
+++ provider/server/ECServer.cpp	Wed Apr 20 19:54:13 2016
@@ -76,6 +76,10 @@
 
 #include "TmpPath.h"
 
+#ifdef __OpenBSD__
+#include <sys/resource.h>
+#endif
+
 #ifdef _DEBUG
 #define new DEBUG_NEW
 #undef THIS_FILE
@@ -967,10 +971,10 @@ int running_server(char *szName, const char *szConfig,
 		{ "thread_stacksize",			"512" },
 		{ "allow_local_users",			"yes", CONFIGSETTING_RELOADABLE },			// allow any user connect through the unix socket
 		{ "local_admin_users",			"root", CONFIGSETTING_RELOADABLE },			// this local user is admin
-		{ "run_as_user",			"zarafa" }, // drop root privileges, and run as this user/group
-		{ "run_as_group",			"zarafa" },
+		{ "run_as_user",			"_zarafa" }, // drop root privileges, and run as this user/group
+		{ "run_as_group",			"_zarafa" },
 		{ "pid_file",					"/var/run/zarafad/server.pid" },
-		{ "running_path",			"/var/lib/zarafa" },
+		{ "running_path",			"/var/empty" },
 		{ "coredump_enabled",			"yes" },
 
 		{ "license_path",			"/etc/zarafa/license", CONFIGSETTING_UNUSED },
@@ -1021,7 +1025,7 @@ int running_server(char *szName, const char *szConfig,
 #ifdef WIN32
 		{ "attachment_path",			"Zarafa Data" },
 #else
-		{ "attachment_path",			"/var/lib/zarafa/attachments" },
+		{ "attachment_path",			"/var/db/zarafa/attachments" },
 #endif
 		{ "attachment_compression",		"6" },
 
@@ -1113,7 +1117,7 @@ int running_server(char *szName, const char *szConfig,
 		{ "client_update_enabled",	"no" },
 		{ "client_update_log_level", "1", CONFIGSETTING_RELOADABLE },
 #ifdef LINUX
-		{ "client_update_path",		"/var/lib/zarafa/client", CONFIGSETTING_RELOADABLE },
+		{ "client_update_path",		"/var/db/zarafa/client", CONFIGSETTING_RELOADABLE },
 		{ "client_update_log_path",	"/var/log/zarafa/autoupdate", CONFIGSETTING_RELOADABLE },
 #else
 		{ "client_update_path",		"c:\\client_update_path", CONFIGSETTING_RELOADABLE },
@@ -1154,10 +1158,14 @@ int running_server(char *szName, const char *szConfig,
 	};
 
 #ifdef LINUX
+#if defined(__linux__)
 	char buffer[256];
 	confstr(_CS_GNU_LIBPTHREAD_VERSION, buffer, sizeof(buffer));
 	if (strncmp(buffer, "linuxthreads", strlen("linuxthreads")) == 0)
 		m_bNPTL = false;
+#elif defined(__OpenBSD__)
+	m_bNPTL = true;
+#endif
 #endif
 
 	// Init random generator
