Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
7292de8d
Commit
7292de8d
authored
Jun 11, 2016
by
Constantin Rack
Committed by
GitHub
Jun 11, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2031 from bluca/vector_data
Problem: std:vector.data breaks compat with C++98
parents
4ea6df43
0dede9b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
ipc_listener.cpp
src/ipc_listener.cpp
+5
-5
No files found.
src/ipc_listener.cpp
View file @
7292de8d
...
...
@@ -100,7 +100,7 @@ int zmq::ipc_listener_t::create_wildcard_address(std::string& path_,
// We need room for tmp_path + trailing NUL
std
::
vector
<
char
>
buffer
(
tmp_path
.
length
()
+
1
);
strcpy
(
buffer
.
data
(),
tmp_path
.
c_str
());
strcpy
(
&
buffer
[
0
],
tmp_path
.
c_str
());
#ifdef HAVE_MKDTEMP
// Create the directory. POSIX requires that mkdtemp() creates the
...
...
@@ -109,22 +109,22 @@ int zmq::ipc_listener_t::create_wildcard_address(std::string& path_,
// each socket is created in a directory created by mkdtemp(), and
// mkdtemp() guarantees a unique directory name, there will be no
// collision.
if
(
mkdtemp
(
buffer
.
data
())
==
0
)
{
if
(
mkdtemp
(
&
buffer
[
0
])
==
0
)
{
return
-
1
;
}
path_
.
assign
(
buffer
.
data
()
);
path_
.
assign
(
&
buffer
[
0
]
);
file_
.
assign
(
path_
+
"/socket"
);
#else
// Silence -Wunused-parameter. #pragma and __attribute__((unused)) are not
// very portable unfortunately...
(
void
)
path_
;
int
fd
=
mkstemp
(
buffer
.
data
()
);
int
fd
=
mkstemp
(
&
buffer
[
0
]
);
if
(
fd
==
-
1
)
return
-
1
;
::
close
(
fd
);
file_
.
assign
(
buffer
.
data
()
);
file_
.
assign
(
&
buffer
[
0
]
);
#endif
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment