Merge pull request #3516 from moretromain/fedorafix

Fix Fedora 30 build
This commit is contained in:
Luca Boccassi 2019-05-21 14:45:42 +01:00 committed by GitHub
commit cef806550c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,7 @@ void zmq::thread_t::start (thread_fn *tfn_, void *arg_, const char *name_)
_tfn = tfn_;
_arg = arg_;
if (name_)
strncpy (_name, name_, sizeof (_name));
strncpy (_name, name_, sizeof (_name) - 1);
#if defined _WIN32_WCE
_descriptor =
(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_;
_arg = arg_;
if (name_)
strncpy (_name, name_, sizeof (_name));
strncpy (_name, name_, sizeof (_name) - 1);
int rc = pthread_create (&_descriptor, NULL, thread_routine, this);
posix_assert (rc);
_started = true;