Commit 32f3fb49 authored by Ian Barber's avatar Ian Barber

Merge pull request #794 from hintjens/master

Fixed use of deprecated tempnam
parents fc93902c 8ba1311e
This diff is collapsed.
......@@ -131,10 +131,11 @@ int zmq::ipc_listener_t::set_address (const char *addr_)
std::string addr (addr_);
// Allow wildcard file
if (addr[0] == '*') {
char *tmpstr = tempnam (NULL, NULL);
addr.assign (tmpstr);
free (tmpstr);
if (addr [0] == '*') {
char buffer [12] = "2134XXXXXX";
if (mkstemp (buffer) == -1)
return -1;
addr.assign (buffer);
}
// Get rid of the file associated with the UNIX domain socket that
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment