$OpenBSD: patch-provider_libserver_StreamUtil_cpp,v 1.8 2016/04/20 18:38:41 robert Exp $
--- provider/libserver/StreamUtil.cpp.orig	Wed Apr 20 13:13:54 2016
+++ provider/libserver/StreamUtil.cpp	Wed Apr 20 19:54:13 2016
@@ -261,7 +261,9 @@ ECRESULT SerializeDatabasePropVal(LPCSTREAMCAPS lpStre
 	unsigned int ulKind;
 	unsigned int ulNameId;
 	std::string strNameString;
+#ifndef __OpenBSD__
 	locale_t loc = createlocale(LC_NUMERIC, "C");
+#endif
 	convert_context converter;
 
 	short i;
@@ -308,7 +310,11 @@ ECRESULT SerializeDatabasePropVal(LPCSTREAMCAPS lpStre
 			er = ZARAFA_E_NOT_FOUND;
 			goto exit;
 		}
+#ifndef __OpenBSD__
 		flt = (float)strtod_l(lpRow[FIELD_NR_DOUBLE], NULL, loc);
+#else
+		flt = (float)strtod(lpRow[FIELD_NR_DOUBLE], NULL);
+#endif
 		er = lpSink->Write(&flt, sizeof(flt), 1);
 		break;
 	case PT_BOOLEAN:
@@ -325,7 +331,11 @@ ECRESULT SerializeDatabasePropVal(LPCSTREAMCAPS lpStre
 			er = ZARAFA_E_NOT_FOUND;
 			goto exit;
 		}
+#ifndef __OpenBSD__
 		dbl = strtod_l(lpRow[FIELD_NR_DOUBLE], NULL, loc);
+#else
+		dbl = strtod(lpRow[FIELD_NR_DOUBLE], NULL);
+#endif
 		er = lpSink->Write(&dbl, sizeof(dbl), 1);
 		break;
 	case PT_CURRENCY:
@@ -419,7 +429,11 @@ ECRESULT SerializeDatabasePropVal(LPCSTREAMCAPS lpStre
 		ulLastPos = 0;
 		for (unsigned int x = 0; er == erSuccess && x < ulCount; ++x) {
 			ParseMVProp(lpRow[FIELD_NR_DOUBLE], lpLen[FIELD_NR_DOUBLE], &ulLastPos, &strData);
+#ifndef __OpenBSD__
 			flt = (float)strtod_l(strData.c_str(), NULL, loc);
+#else
+			flt = (float)strtod(strData.c_str(), NULL);
+#endif
 			er = lpSink->Write(&flt, sizeof(flt), 1);
 		}
 		break;
@@ -435,7 +449,11 @@ ECRESULT SerializeDatabasePropVal(LPCSTREAMCAPS lpStre
 		ulLastPos = 0;
 		for (unsigned int x = 0; er == erSuccess && x < ulCount; ++x) {
 			ParseMVProp(lpRow[FIELD_NR_DOUBLE], lpLen[FIELD_NR_DOUBLE], &ulLastPos, &strData);
+#ifndef __OpenBSD__
 			dbl = strtod_l(strData.c_str(), NULL, loc);
+#else
+			dbl = strtod(strData.c_str(), NULL);
+#endif
 			er = lpSink->Write(&dbl, sizeof(dbl), 1);
 		}
 		break;
@@ -549,7 +567,9 @@ ECRESULT SerializeDatabasePropVal(LPCSTREAMCAPS lpStre
 	}
 
 exit:
+#ifndef __OpenBSD__
 	freelocale(loc);
+#endif
 	return er;
 }
 
