mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-10 07:56:09 +00:00
Problem: build fails on VS2010 as it does not have snprintf
Solution: ifdef it
This commit is contained in:
parent
c63b0955e5
commit
f83b13b2d6
@ -425,11 +425,15 @@ void zmq::thread_ctx_t::start_thread (thread_t &thread_,
|
||||
thread_.setSchedulingParameters (_thread_priority, _thread_sched_policy,
|
||||
_thread_affinity_cpus);
|
||||
|
||||
char namebuf[16];
|
||||
char namebuf[16] = "";
|
||||
#ifdef ZMQ_HAVE_WINDOWS
|
||||
LIBZMQ_UNUSED (name_);
|
||||
#else
|
||||
snprintf (namebuf, sizeof (namebuf), "%s%sZMQbg%s%s",
|
||||
_thread_name_prefix.empty () ? "" : _thread_name_prefix.c_str (),
|
||||
_thread_name_prefix.empty () ? "" : "/", name_ ? "/" : "",
|
||||
name_ ? name_ : "");
|
||||
#endif
|
||||
thread_.start (tfn_, arg_, namebuf);
|
||||
}
|
||||
|
||||
|
@ -56,9 +56,11 @@ zmq::io_thread_t::~io_thread_t ()
|
||||
|
||||
void zmq::io_thread_t::start ()
|
||||
{
|
||||
char name[16];
|
||||
char name[16] = "";
|
||||
#ifndef ZMQ_HAVE_WINDOWS
|
||||
snprintf (name, sizeof (name), "IO/%u",
|
||||
get_tid () - zmq::ctx_t::reaper_tid - 1);
|
||||
#endif
|
||||
// Start the underlying I/O thread.
|
||||
_poller->start (name);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user