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
8114fae3
Commit
8114fae3
authored
Oct 25, 2019
by
Douglas Carmichael
Committed by
Dominik Charousset
Nov 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OpenBSD compilation support.
parent
6e727d99
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
libcaf_core/caf/config.hpp
libcaf_core/caf/config.hpp
+2
-0
libcaf_io/src/interfaces.cpp
libcaf_io/src/interfaces.cpp
+2
-0
libcaf_io/src/native_socket.cpp
libcaf_io/src/native_socket.cpp
+8
-3
No files found.
libcaf_core/caf/config.hpp
View file @
8114fae3
...
...
@@ -209,6 +209,8 @@
# endif
#elif defined(__FreeBSD__)
# define CAF_BSD
#elif defined(__OpenBSD__)
# define CAF_BSD
#elif defined(__CYGWIN__)
# define CAF_CYGWIN
#elif defined(WIN32) || defined(_WIN32)
...
...
libcaf_io/src/interfaces.cpp
View file @
8114fae3
...
...
@@ -290,8 +290,10 @@ bool interfaces::get_endpoint(const std::string& host, uint16_t port,
hint
.
ai_socktype
=
SOCK_DGRAM
;
if
(
preferred
)
hint
.
ai_family
=
*
preferred
==
protocol
::
network
::
ipv4
?
AF_INET
:
AF_INET6
;
#ifndef __OpenBSD__
if
(
hint
.
ai_family
==
AF_INET6
)
hint
.
ai_flags
=
AI_V4MAPPED
;
#endif
addrinfo
*
tmp
=
nullptr
;
if
(
getaddrinfo
(
host
.
c_str
(),
port_hint
,
&
hint
,
&
tmp
)
!=
0
)
return
false
;
...
...
libcaf_io/src/native_socket.cpp
View file @
8114fae3
...
...
@@ -94,9 +94,14 @@ namespace network {
// platform-dependent SIGPIPE setup
#if defined(CAF_MACOS) || defined(CAF_IOS) || defined(CAF_BSD)
// Use the socket option but no flags to recv/send on macOS/iOS/BSD.
const
int
no_sigpipe_socket_flag
=
SO_NOSIGPIPE
;
const
int
no_sigpipe_io_flag
=
0
;
// 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
;
#else
const
int
no_sigpipe_socket_flag
=
0
;
#endif
const
int
no_sigpipe_io_flag
=
0
;
#elif defined(CAF_WINDOWS)
// Do nothing on Windows (SIGPIPE does not exist).
const
int
no_sigpipe_socket_flag
=
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