mirror of
https://github.com/zeromq/libzmq.git
synced 2025-02-22 15:07:28 +01:00
Fixed use of deprecated tempnam
This commit is contained in:
parent
cf69781570
commit
8ba1311e34
@ -132,9 +132,10 @@ int zmq::ipc_listener_t::set_address (const char *addr_)
|
||||
|
||||
// Allow wildcard file
|
||||
if (addr [0] == '*') {
|
||||
char *tmpstr = tempnam (NULL, NULL);
|
||||
addr.assign (tmpstr);
|
||||
free (tmpstr);
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user