From patchwork Fri Aug 12 13:04:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 9276909 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5A729600CB for ; Fri, 12 Aug 2016 13:04:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49C67289D4 for ; Fri, 12 Aug 2016 13:04:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B32C289EA; Fri, 12 Aug 2016 13:04:57 +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=-6.9 required=2.0 tests=BAYES_00,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 5A0EB289D4 for ; Fri, 12 Aug 2016 13:04:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752408AbcHLNEz (ORCPT ); Fri, 12 Aug 2016 09:04:55 -0400 Received: from guitar.tcltek.co.il ([192.115.133.116]:47277 "EHLO mx.tkos.co.il" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752296AbcHLNEy (ORCPT ); Fri, 12 Aug 2016 09:04:54 -0400 Received: from tarshish.tkos.co.il (unknown [10.0.8.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx.tkos.co.il (Postfix) with ESMTPSA id C70D24409B0; Fri, 12 Aug 2016 16:04:51 +0300 (IDT) From: Baruch Siach To: Mark Brown Cc: linux-spi@vger.kernel.org, Baruch Siach Subject: [PATCH] tools: spidev_test: fix build with musl libc Date: Fri, 12 Aug 2016 16:04:33 +0300 Message-Id: <9c96a08dcf783de3008800ea497775fcaa52147b.1471007073.git.baruch@tkos.co.il> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP spidev.h uses _IOC_SIZEBITS directly. musl libc does not provide this macro unless linux/ioctl.h is included explicitly. Fixes build failures like: In file included from .../host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/sys/ioctl.h:7:0, from .../build/spidev_test-v3.15/spidev_test.c:20: .../build/spidev_test-v3.15/spidev_test.c: In function ‘transfer’: .../build/spidev_test-v3.15/spidev_test.c:75:18: error: ‘_IOC_SIZEBITS’ undeclared (first use in this function) ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); ^ Signed-off-by: Baruch Siach --- tools/spi/spidev_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/spi/spidev_test.c b/tools/spi/spidev_test.c index 8a73d8185316..1eaa4de6605b 100644 --- a/tools/spi/spidev_test.c +++ b/tools/spi/spidev_test.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include