Return-Path: X-Original-To: apmail-mesos-issues-archive@minotaur.apache.org Delivered-To: apmail-mesos-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D123810C0D for ; Mon, 17 Nov 2014 20:34:34 +0000 (UTC) Received: (qmail 83088 invoked by uid 500); 17 Nov 2014 20:34:34 -0000 Delivered-To: apmail-mesos-issues-archive@mesos.apache.org Received: (qmail 83054 invoked by uid 500); 17 Nov 2014 20:34:34 -0000 Mailing-List: contact issues-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mesos.apache.org Delivered-To: mailing list issues@mesos.apache.org Received: (qmail 83044 invoked by uid 99); 17 Nov 2014 20:34:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Nov 2014 20:34:34 +0000 Date: Mon, 17 Nov 2014 20:34:34 +0000 (UTC) From: "Till Toenshoff (JIRA)" To: issues@mesos.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (MESOS-2116) socket.hpp breaks build. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MESOS-2116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Till Toenshoff closed MESOS-2116. --------------------------------- Resolution: Fixed commit 4913b869778d7e8eb0c15c2b4ec9b11d17077960 Author: Joris Van Remoortere Date: Mon Nov 17 21:21:19 2014 +0100 Fix compilation error for Socket on older linux + OSX. Test whether SOCK_NONBLOCK and SOCK_CLOEXEC are defined to use single system call to create socket. Otherwise use os::nonblock and os::cloexec after creating the socket. Review: https://reviews.apache.org/r/28125 > socket.hpp breaks build. > ------------------------ > > Key: MESOS-2116 > URL: https://issues.apache.org/jira/browse/MESOS-2116 > Project: Mesos > Issue Type: Bug > Environment: OSX 10.10.1, clang > Reporter: Till Toenshoff > Assignee: Joris Van Remoortere > Priority: Blocker > > 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)