mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-15 02:07:59 +08:00
Fix compiler error
This commit is contained in:
parent
2b63a89635
commit
5b07a1199c
@ -58,7 +58,7 @@ void zmq::thread_t::start (thread_fn *tfn_, void *arg_, const char *name_)
|
|||||||
_tfn = tfn_;
|
_tfn = tfn_;
|
||||||
_arg = arg_;
|
_arg = arg_;
|
||||||
if (name_)
|
if (name_)
|
||||||
strncpy (_name, name_, sizeof (_name));
|
strncpy (_name, name_, sizeof (_name) - 1);
|
||||||
#if defined _WIN32_WCE
|
#if defined _WIN32_WCE
|
||||||
_descriptor =
|
_descriptor =
|
||||||
(HANDLE) CreateThread (NULL, 0, &::thread_routine, this, 0, NULL);
|
(HANDLE) CreateThread (NULL, 0, &::thread_routine, this, 0, NULL);
|
||||||
@ -232,7 +232,7 @@ void zmq::thread_t::start (thread_fn *tfn_, void *arg_, const char *name_)
|
|||||||
_tfn = tfn_;
|
_tfn = tfn_;
|
||||||
_arg = arg_;
|
_arg = arg_;
|
||||||
if (name_)
|
if (name_)
|
||||||
strncpy (_name, name_, sizeof (_name));
|
strncpy (_name, name_, sizeof (_name) - 1);
|
||||||
int rc = pthread_create (&_descriptor, NULL, thread_routine, this);
|
int rc = pthread_create (&_descriptor, NULL, thread_routine, this);
|
||||||
posix_assert (rc);
|
posix_assert (rc);
|
||||||
_started = true;
|
_started = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user