From patchwork Mon Mar 14 14:30:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Richardson X-Patchwork-Id: 597058 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3qP0Y83M8zz9sdt for ; Tue, 15 Mar 2016 01:31:08 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 596E810291; Mon, 14 Mar 2016 07:30:40 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id AC98510290 for ; Mon, 14 Mar 2016 07:30:39 -0700 (PDT) Received: from bar5.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id 39CD14203CD for ; Mon, 14 Mar 2016 08:30:39 -0600 (MDT) X-ASG-Debug-ID: 1457965838-09eadd060c1e8d20001-byXFYA Received: from mx3-pf3.cudamail.com ([192.168.14.3]) by bar5.cudamail.com with ESMTP id JTRmBzxr932b8b4f (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 14 Mar 2016 08:30:38 -0600 (MDT) X-Barracuda-Envelope-From: lrichard@redhat.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.3 Received: from unknown (HELO mx1.redhat.com) (209.132.183.28) by mx3-pf3.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 14 Mar 2016 15:25:37 -0000 Received-SPF: pass (mx3-pf3.cudamail.com: SPF record at _spf1.redhat.com designates 209.132.183.28 as permitted sender) X-Barracuda-Apparent-Source-IP: 209.132.183.28 X-Barracuda-RBL-IP: 209.132.183.28 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id DFCED12B38 for ; Mon, 14 Mar 2016 14:30:37 +0000 (UTC) Received: from localhost.localdomain.com (vpn1-5-246.ams2.redhat.com [10.36.5.246]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2EEUPT0025100 for ; Mon, 14 Mar 2016 10:30:36 -0400 X-CudaMail-Envelope-Sender: lrichard@redhat.com From: Lance Richardson To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-V3-313019274 X-CudaMail-DTE: 031416 X-CudaMail-Originating-IP: 209.132.183.28 Date: Mon, 14 Mar 2016 10:30:19 -0400 X-ASG-Orig-Subj: [##CM-V3-313019274##][PATCH 5/5] osx: Temporary compilation workarounds Message-Id: <1457965819-9473-6-git-send-email-lrichard@redhat.com> In-Reply-To: <1457965819-9473-1-git-send-email-lrichard@redhat.com> References: <1457965819-9473-1-git-send-email-lrichard@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Barracuda-Connect: UNKNOWN[192.168.14.3] X-Barracuda-Start-Time: 1457965838 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH 5/5] osx: Temporary compilation workarounds X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Base OS X does not implement a tap netdevice, stub out netdev-bsd.c for OS X. OS X rounding/padding rules for rtnetlink messages need to be researched, for now force route_table_fallback_lookup() to return failure on OS X systems. Signed-off-by: Lance Richardson --- lib/netdev-bsd.c | 2 ++ lib/rtbsd.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/lib/netdev-bsd.c b/lib/netdev-bsd.c index edf04bf..72dca5f 100644 --- a/lib/netdev-bsd.c +++ b/lib/netdev-bsd.c @@ -15,6 +15,7 @@ * limitations under the License. */ +#if !defined(__MACH__) #include #include "netdev-provider.h" @@ -1825,3 +1826,4 @@ af_link_ioctl(unsigned long command, const void *arg) : 0); } #endif +#endif /* !defined(__MACH__) */ diff --git a/lib/rtbsd.c b/lib/rtbsd.c index 33fb9fd..fe4c55c 100644 --- a/lib/rtbsd.c +++ b/lib/rtbsd.c @@ -128,7 +128,9 @@ rtbsd_notifier_run(void) case RTM_IFINFO: /* Since RTM_IFANNOUNCE messages are smaller than RTM_IFINFO * messages, the same buffer may be used. */ +#ifndef __MACH__ /* OS X does not implement RTM_IFANNOUNCE */ case RTM_IFANNOUNCE: +#endif rtbsd_report_change(&msg); break; default: @@ -180,11 +182,13 @@ rtbsd_report_change(const struct if_msghdr *msg) change.if_index = msg->ifm_index; if_indextoname(msg->ifm_index, change.if_name); break; +#ifndef __MACH__ /* OS X does not implement RTM_IFANNOUNCE */ case RTM_IFANNOUNCE: ahdr = (const struct if_announcemsghdr *) msg; change.if_index = ahdr->ifan_index; strncpy(change.if_name, ahdr->ifan_name, IF_NAMESIZE); break; +#endif } LIST_FOR_EACH (notifier, node, &all_notifiers) {