Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
e3e59da0
Commit
e3e59da0
authored
Nov 10, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #950
parents
4d4c1fdb
cd8df4fb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
libcaf_core/caf/config.hpp
libcaf_core/caf/config.hpp
+2
-0
libcaf_io/src/io/network/interfaces.cpp
libcaf_io/src/io/network/interfaces.cpp
+2
-0
libcaf_io/src/io/network/native_socket.cpp
libcaf_io/src/io/network/native_socket.cpp
+5
-0
No files found.
libcaf_core/caf/config.hpp
View file @
e3e59da0
...
@@ -209,6 +209,8 @@
...
@@ -209,6 +209,8 @@
# endif
# endif
#elif defined(__FreeBSD__)
#elif defined(__FreeBSD__)
# define CAF_BSD
# define CAF_BSD
#elif defined(__OpenBSD__)
# define CAF_BSD
#elif defined(__CYGWIN__)
#elif defined(__CYGWIN__)
# define CAF_CYGWIN
# define CAF_CYGWIN
#elif defined(WIN32) || defined(_WIN32)
#elif defined(WIN32) || defined(_WIN32)
...
...
libcaf_io/src/io/network/interfaces.cpp
View file @
e3e59da0
...
@@ -288,8 +288,10 @@ bool interfaces::get_endpoint(const std::string& host, uint16_t port,
...
@@ -288,8 +288,10 @@ bool interfaces::get_endpoint(const std::string& host, uint16_t port,
hint
.
ai_socktype
=
SOCK_DGRAM
;
hint
.
ai_socktype
=
SOCK_DGRAM
;
if
(
preferred
)
if
(
preferred
)
hint
.
ai_family
=
*
preferred
==
protocol
::
network
::
ipv4
?
AF_INET
:
AF_INET6
;
hint
.
ai_family
=
*
preferred
==
protocol
::
network
::
ipv4
?
AF_INET
:
AF_INET6
;
#ifndef __OpenBSD__
if
(
hint
.
ai_family
==
AF_INET6
)
if
(
hint
.
ai_family
==
AF_INET6
)
hint
.
ai_flags
=
AI_V4MAPPED
;
hint
.
ai_flags
=
AI_V4MAPPED
;
#endif
addrinfo
*
tmp
=
nullptr
;
addrinfo
*
tmp
=
nullptr
;
if
(
getaddrinfo
(
host
.
c_str
(),
port_hint
,
&
hint
,
&
tmp
)
!=
0
)
if
(
getaddrinfo
(
host
.
c_str
(),
port_hint
,
&
hint
,
&
tmp
)
!=
0
)
return
false
;
return
false
;
...
...
libcaf_io/src/io/network/native_socket.cpp
View file @
e3e59da0
...
@@ -96,7 +96,12 @@ const int ec_interrupted_syscall = EINTR;
...
@@ -96,7 +96,12 @@ const int ec_interrupted_syscall = EINTR;
// platform-dependent SIGPIPE setup
// platform-dependent SIGPIPE setup
#if defined(CAF_MACOS) || defined(CAF_IOS) || defined(CAF_BSD)
#if defined(CAF_MACOS) || defined(CAF_IOS) || defined(CAF_BSD)
// Use the socket option but no flags to recv/send on macOS/iOS/BSD.
// Use the socket option but no flags to recv/send on macOS/iOS/BSD.
// (OpenBSD doesn't have SO_NOSIGPIPE)
#ifndef __OpenBSD__
const
int
no_sigpipe_socket_flag
=
SO_NOSIGPIPE
;
const
int
no_sigpipe_socket_flag
=
SO_NOSIGPIPE
;
#else
const
int
no_sigpipe_socket_flag
=
0
;
#endif
const
int
no_sigpipe_io_flag
=
0
;
const
int
no_sigpipe_io_flag
=
0
;
#elif defined(CAF_WINDOWS)
#elif defined(CAF_WINDOWS)
// Do nothing on Windows (SIGPIPE does not exist).
// Do nothing on Windows (SIGPIPE does not exist).
...
...
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