$OpenBSD: patch-common_ustringutil_cpp,v 1.5 2015/11/02 11:06:34 robert Exp $
--- common/ustringutil.cpp.orig	Thu Aug 20 12:51:22 2015
+++ common/ustringutil.cpp	Thu Aug 20 12:52:28 2015
@@ -164,12 +164,18 @@ int ECSortKey::compareTo(const ECSortKey &other) const
  */
 const char* str_ifind(const char *haystack, const char *needle)
 {
+#ifndef __OpenBSD__
 	locale_t loc = createlocale(LC_CTYPE, "C");
+#endif
 	const char *needlepos = needle;
 	const char *needlestart = haystack;
 
 	while(*haystack) {
+#ifndef __OpenBSD__
 		if (toupper_l(*haystack, loc) == toupper_l(*needlepos, loc)) {
+#else
+		if (toupper(*haystack) == toupper(*needlepos)) {
+#endif
 			needlepos++;
 
 			if(*needlepos == 0)
@@ -184,7 +190,9 @@ const char* str_ifind(const char *haystack, const char
 	needlestart = NULL;
 
 exit:
+#ifndef __OpenBSD__
 	freelocale(loc);
+#endif
 
 	return needlestart;
 }
@@ -1601,8 +1609,10 @@ ECLocale::ECLocale(const ECLocale &other)
 }
 
 ECLocale::~ECLocale() {
+#ifndef __OpenBSD__
 	if (m_locale)
 		freelocale(m_locale);
+#endif
 }
 
 ECLocale &ECLocale::operator=(const ECLocale &other) {
