Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
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
capnproto
Commits
dbb2e985
Commit
dbb2e985
authored
Sep 22, 2017
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to fix mac build.
parent
fc3f04eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
async-io-unix.c++
c++/src/kj/async-io-unix.c++
+14
-2
No files found.
c++/src/kj/async-io-unix.c++
View file @
dbb2e985
...
...
@@ -439,8 +439,14 @@ private:
msg
.
msg_control
=
&
cmsg
;
msg
.
msg_controllen
=
sizeof
(
cmsgSpace
);
#ifdef MSG_CMSG_CLOEXEC
int
recvmsgFlags
=
MSG_CMSG_CLOEXEC
;
#else
int
recvmsgFlags
=
0
;
#endif
ssize_t
n
;
KJ_NONBLOCKING_SYSCALL
(
n
=
recvmsg
(
fd
,
&
msg
,
MSG_CMSG_CLOEXEC
));
KJ_NONBLOCKING_SYSCALL
(
n
=
recvmsg
(
fd
,
&
msg
,
recvmsgFlags
));
if
(
n
<
0
)
{
return
observer
.
whenBecomesReadable
().
then
([
this
]()
{
return
tryReceiveFdImpl
<
T
>
();
...
...
@@ -464,11 +470,17 @@ private:
AutoCloseFd
wrapFd
(
int
newFd
,
AutoCloseFd
*
)
{
auto
result
=
AutoCloseFd
(
newFd
);
#ifndef MSG_CMSG_CLOEXEC
setCloseOnExec
(
result
);
#endif
return
result
;
}
Own
<
AsyncCapabilityStream
>
wrapFd
(
int
newFd
,
Own
<
AsyncCapabilityStream
>*
)
{
return
kj
::
heap
<
AsyncStreamFd
>
(
eventPort
,
newFd
,
LowLevelAsyncIoProvider
::
TAKE_OWNERSHIP
);
return
kj
::
heap
<
AsyncStreamFd
>
(
eventPort
,
newFd
,
#ifdef MSG_CMSG_CLOEXEC
LowLevelAsyncIoProvider
::
ALREADY_CLOEXEC
|
#endif
LowLevelAsyncIoProvider
::
TAKE_OWNERSHIP
);
}
};
...
...
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