$OpenBSD: patch-j2se_src_solaris_instrument_EncodingSupport_md_c,v 1.1 2007/09/06 15:46:19 kurt Exp $
--- j2se/src/solaris/instrument/EncodingSupport_md.c.orig	Thu Jul  5 05:03:37 2007
+++ j2se/src/solaris/instrument/EncodingSupport_md.c	Fri Jul 27 18:25:14 2007
@@ -28,7 +28,10 @@
 #include <string.h>
 #include <ctype.h>
 #include <locale.h>
+#ifndef __OpenBSD__
+#define HAVE_NL_LANGINFO
 #include <langinfo.h>
+#endif
 #include <iconv.h>
 
 /* Routines to convert back and forth between Platform Encoding and UTF-8 */
@@ -63,12 +66,16 @@ utfInitialize(void)
     /* Set the locale from the environment */
     (void)setlocale(LC_ALL, "");
 
+#ifdef HAVE_NL_LANGINFO
     /* Get the codeset name */
     codeset = (char*)nl_langinfo(CODESET);  
     if ( codeset == NULL || codeset[0] == 0 ) {
         UTF_DEBUG(("NO codeset returned by nl_langinfo(CODESET)\n"));
 	return;
     }
+#else
+    codeset = "ISO-8859-1";
+#endif
     
     UTF_DEBUG(("Codeset = %s\n", codeset));
     
