Skip to content

Commit

Permalink
Add lock for shared iconv object on Solaris. (#12)
Browse files Browse the repository at this point in the history
Add lock for shared iconv object on Solaris.
  • Loading branch information
JumpingYang001 authored and Jodie111 committed Dec 6, 2022
1 parent 637d092 commit d2db43e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/code/scxcorelib/util/scxstream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#if defined(sun)

#include <scxcorelib/scxthreadlock.h>
#include <iconv.h>
#include <stdlib.h>
#include <errno.h>
Expand Down Expand Up @@ -655,7 +656,7 @@ namespace SCXCoreLib {
}

static const unsigned int BUFSIZE = 10;

SCXCoreLib::SCXThreadLock lock(SCXCoreLib::ThreadLockHandleGet(L"IconvLock"));
iconv_t ic = SCXCoreLib::SCXLocaleContext::GetToUTF8iconv();

if (ic == NULL)
Expand Down

0 comments on commit d2db43e

Please sign in to comment.