Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
None
-
None
-
None
-
None
-
OSX 10.10.1, clang
Description
The following happens when building on OSX.
In file included from ../../../3rdparty/libprocess/src/clock.cpp:10: In file included from ../../../3rdparty/libprocess/include/process/process.hpp:11: In file included from ../../../3rdparty/libprocess/include/process/event.hpp:7: ../../../3rdparty/libprocess/include/process/socket.hpp:96:48: error: use of undeclared identifier 'SOCK_NONBLOCK' process::socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0); ^ ../../../3rdparty/libprocess/include/process/socket.hpp:96:64: error: use of undeclared identifier 'SOCK_CLOEXEC' process::socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0);
Please mind that both, SOCK_NONBLOCK and SOCK_CLOEXEC are linux specifics:
Since Linux 2.6.27, the type argument serves a second purpose: in
addition to specifying a socket type, it may include the bitwise OR
of any of the following values, to modify the behavior of socket():SOCK_NONBLOCK Set the O_NONBLOCK file status flag on the new open
file description. Using this flag saves extra calls
to fcntl(2) to achieve the same result.SOCK_CLOEXEC Set the close-on-exec (FD_CLOEXEC) flag on the new
file descriptor. See the description of the
O_CLOEXEC flag in open(2) for reasons why this may be
useful.