From patchwork Mon Jan 14 15:27:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Slavomir Kaslev X-Patchwork-Id: 10762947 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EC237139A for ; Mon, 14 Jan 2019 15:28:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDF952940D for ; Mon, 14 Jan 2019 15:28:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D27B12942F; Mon, 14 Jan 2019 15:28:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 624E72940D for ; Mon, 14 Jan 2019 15:28:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726723AbfANP2M (ORCPT ); Mon, 14 Jan 2019 10:28:12 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:45251 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726696AbfANP2L (ORCPT ); Mon, 14 Jan 2019 10:28:11 -0500 Received: by mail-wr1-f67.google.com with SMTP id t6so23276137wrr.12 for ; Mon, 14 Jan 2019 07:28:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qAVEmCrwQ7LbzgWl1iLQa+qb+EmOa9tBt+vB6/lwOjI=; b=j/yNeTuaHP+EY7n+kJOui+z1rhFLQZGqhcCNmJYLh1jq1dNkWu8l778Js2/+zKOgGw H6MJcv4YjbYWNUkua+TGPKH8eKaL6ktVxk2egLk0ppSBxEq5gcc7UeP2aOYnumM+xsuz 7vyUQsF0hH07fDaCAG5mvql38+wqdM/3fRywfMbI1SUdz0LLFZmTo8ZoF8sbH8sWZMNr ifbw2SRBkjnT/dTNx4hKIiRrEOL6tJXq6bcC1493wyrPATHqCp2FJbUg2Yff4PEQ3uCP nVPdQQVIrV7tgy7pTpsR8Wu2eHnUdBWeIgwiuOk4G5vUwRQLjNkaV2EgiMXH2zeAepyI f5HQ== X-Gm-Message-State: AJcUukeKOaD2Ed5uWAORgX9/ZyKcV5Kq9g4yV77sV1/r9A6QQTkhPpU1 UXCKlMl3m2FWiTS7Ft8PSMlZhCzyqHmU X-Google-Smtp-Source: ALg8bN7ledfxlwl/UICgJPlperXekKZSAlQn3OaMbB9TUbhpWFXi8ijY8caVxNC5AS6wsqT9AEOAvw== X-Received: by 2002:a5d:63c3:: with SMTP id c3mr24469693wrw.215.1547479689860; Mon, 14 Jan 2019 07:28:09 -0800 (PST) Received: from box.eng.vmware.com ([146.247.46.5]) by smtp.gmail.com with ESMTPSA id a132sm34784167wmh.5.2019.01.14.07.28.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Jan 2019 07:28:09 -0800 (PST) From: Slavomir Kaslev To: linux-trace-devel@vger.kernel.org Cc: rostedt@goodmis.org, ykaradzhov@vmware.com, tstoyanov@vmware.com Subject: [PATCH v3 2/6] trace-cmd: Detect if vsock sockets are available Date: Mon, 14 Jan 2019 17:27:56 +0200 Message-Id: <20190114152800.31060-3-kaslevs@vmware.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190114152800.31060-1-kaslevs@vmware.com> References: <20190114152800.31060-1-kaslevs@vmware.com> MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Steven Rostedt (VMware)" Detect and define VSOCK if vsock sockets are available on the system. This macro is used to disable VM remote tracing features on older kernels. Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Slavomir Kaslev --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 27d3683..abc4f0c 100644 --- a/Makefile +++ b/Makefile @@ -205,6 +205,13 @@ CFLAGS ?= -g -Wall CPPFLAGS ?= LDFLAGS ?= +VSOCK_DEFINED := $(shell if (echo "\#include " | $(CC) -E - >/dev/null 2>&1) ; then echo 1; else echo 0 ; fi) + +export VSOCK_DEFINED +ifeq ($(VSOCK_DEFINED), 1) +CFLAGS += -DVSOCK +endif + export CFLAGS export INCLUDES