$OpenBSD: patch-provider_libserver_StreamUtil_cpp,v 1.5 2012/08/30 14:28:22 ajacoutot Exp $
--- provider/libserver/StreamUtil.cpp.orig	Mon Aug 27 10:04:10 2012
+++ provider/libserver/StreamUtil.cpp	Mon Aug 27 10:06:17 2012
@@ -286,7 +286,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;
@@ -331,7 +333,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:
@@ -348,7 +354,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:
@@ -445,7 +455,11 @@ ECRESULT SerializeDatabasePropVal(LPCSTREAMCAPS lpStre
 		for (unsigned 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;
@@ -462,7 +476,11 @@ ECRESULT SerializeDatabasePropVal(LPCSTREAMCAPS lpStre
 		for (unsigned 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;
@@ -580,7 +598,9 @@ ECRESULT SerializeDatabasePropVal(LPCSTREAMCAPS lpStre
 	}
 
 exit:
+#ifndef __OpenBSD__
 	freelocale(loc);
+#endif
 	return er;
 }
 
