From patchwork Fri Feb 26 14:06:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bamvor Zhang X-Patchwork-Id: 63061 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp736866lbc; Fri, 26 Feb 2016 06:06:55 -0800 (PST) X-Received: by 10.98.11.134 with SMTP id 6mr2335135pfl.109.1456495611541; Fri, 26 Feb 2016 06:06:51 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 81si20152986pfq.221.2016.02.26.06.06.51; Fri, 26 Feb 2016 06:06:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@gmail.com; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932371AbcBZOGr (ORCPT + 4 others); Fri, 26 Feb 2016 09:06:47 -0500 Received: from mail-pf0-f175.google.com ([209.85.192.175]:36106 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932611AbcBZOGo (ORCPT ); Fri, 26 Feb 2016 09:06:44 -0500 Received: by mail-pf0-f175.google.com with SMTP id e127so52935134pfe.3 for ; Fri, 26 Feb 2016 06:06:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=ANUiO0/0K0hGtxrBDQ4G4CTy/O3KgzbbkCz7Kc781X8=; b=N51pmONfkydA2V9k0xk8mOEZg+VQNAOBrNlgQODXSwQTCoQS6tVp1mlmwvaWUIRxwi UMQCX+BbCtGdSX2xZFVnEqyjraPwBl5nmi1rH1QloRR/aGrmelfwT5RwyoVG3bt6Tu7d VZ28eKmGaBdYWqDuyniKOgnXo3mVxptEjjA9SpzcKZg5Dgk7QXZ4RthYV/wzQB1nfKFC pO/YU69hohFyYOZ4G4QDkT/3Zk0Ls02BjZnj0nXR5KNK/pfUdAh5pJVrBjE/bMRJf8+m SdUE8PAztJooOO9ClWc/cJUl/0pJgWiodnGBmeQh+wlwhB7RxQeijYtt4vkW2C5qLByO hxag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ANUiO0/0K0hGtxrBDQ4G4CTy/O3KgzbbkCz7Kc781X8=; b=km7RF7xo2zDubCI5nT5TuhiNDkwgLxgf7xPz4ViCj195UWLK1L1eTbxWryIpOovH0A oDHhyDNPNFtPltZLM691d+m+lZ7cjTNVFUvsz+3huibhULHJqWbJ+ZNYRVm2Oa2egZHv XXpstWT89ZYd19km7HYTWl27aTpG+mKey1YRzDNQ2ZiyuCDKqJz6eOxdNgrkWQmDiRA1 ae1NeAI9k5rctaqcjluO7gDR8euP6tq68TA6ToTtp6dbx8tTRg905lWAh2jD+UpEUptn 9xe/Tiu7K5GjIcHAN7P+H1tFWfQJAr3asQmmriH9HWse5TVpx33jrS0NwlWdwsAGRITt RR8Q== X-Gm-Message-State: AD7BkJLMTzumCeslW7fGmKzz2lz9zoX8wKmhKeKborZ1TRdKYbCim4WnGT7oBTt+WUaQSg== X-Received: by 10.98.7.14 with SMTP id b14mr2385889pfd.40.1456495603998; Fri, 26 Feb 2016 06:06:43 -0800 (PST) Received: from linux-5iys.lan ([116.251.213.186]) by smtp.gmail.com with ESMTPSA id r65sm19789698pfa.27.2016.02.26.06.06.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Feb 2016 06:06:43 -0800 (PST) From: Bamvor Jian Zhang To: linux-gpio@vger.kernel.org Cc: linus.walleij@linaro.org, broonie@kernel.org, Bamvor Jian Zhang Subject: [PATCH] tools: gpio: add kernel headers in CFLAGS Date: Fri, 26 Feb 2016 22:06:30 +0800 Message-Id: <1456495590-7610-1-git-send-email-bamv2005@gmail.com> X-Mailer: git-send-email 2.6.2 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Bamvor Jian Zhang Gpio tools require linux/gpio.h which may be only exist in kernel source code in a cross compile environment. Add such header to CFLAGS to avoid compiling failure. Signed-off-by: Bamvor Jian Zhang --- tools/gpio/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -- 2.6.2 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/tools/gpio/Makefile b/tools/gpio/Makefile index 4d198d5..6b8804f 100644 --- a/tools/gpio/Makefile +++ b/tools/gpio/Makefile @@ -1,5 +1,11 @@ +ifneq ($(INSTALL_HDR_PATH),) +KERNEL_HEADERS := $(INSTALL_HDR_PATH)/include +else +KERNEL_HEADERS ?= $(abspath ../../usr/include) +endif + CC = $(CROSS_COMPILE)gcc -CFLAGS += -Wall -g -D_GNU_SOURCE +CFLAGS += -Wall -g -D_GNU_SOURCE -I $(KERNEL_HEADERS) all: lsgpio