Index: osdep/getch2-os2.c =================================================================== --- osdep/getch2-os2.c (revision 29289) +++ osdep/getch2-os2.c (working copy) @@ -26,6 +37,7 @@ #include #include +#include #include "config.h" #include "keycodes.h" @@ -189,7 +201,7 @@ #ifdef HAVE_LANGINFO setlocale( LC_CTYPE, ""); - charset = nl_langinfo( CODESET ); + charset = strdup( nl_langinfo( CODESET )); setlocale( LC_CTYPE, "C"); #endif