You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Till Toenshoff (JIRA)" <ji...@apache.org> on 2014/11/17 13:22:34 UTC

[jira] [Created] (MESOS-2116) socket.hpp breaks build.

Till Toenshoff created MESOS-2116:
-------------------------------------

             Summary: socket.hpp breaks build.
                 Key: MESOS-2116
                 URL: https://issues.apache.org/jira/browse/MESOS-2116
             Project: Mesos
          Issue Type: Bug
            Reporter: Till Toenshoff


The following happens when building on OSX.

{noformat}
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);
{noformat}

Please mind that both, SOCK_NONBLOCK and SOCK_CLOEXEC are linux specifics:

{quote}
       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.
{quote}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)