From patchwork Mon Oct 24 08:29:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Trofimovich X-Patchwork-Id: 9391581 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 022906077A for ; Mon, 24 Oct 2016 08:29:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E797828B7A for ; Mon, 24 Oct 2016 08:29:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB28928D23; Mon, 24 Oct 2016 08:29:56 +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, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,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 54C4A28D19 for ; Mon, 24 Oct 2016 08:29:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934287AbcJXI3w (ORCPT ); Mon, 24 Oct 2016 04:29:52 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:56908 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933689AbcJXI3v (ORCPT ); Mon, 24 Oct 2016 04:29:51 -0400 Received: from sf.home (unknown [148.252.128.73]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: slyfox) by smtp.gentoo.org (Postfix) with ESMTPSA id 69599341693; Mon, 24 Oct 2016 08:29:49 +0000 (UTC) Received: by sf.home (Postfix, from userid 1000) id 1216F19EF8F15; Mon, 24 Oct 2016 09:29:39 +0100 (BST) From: slyich@gmail.com To: David Sterba Cc: linux-btrfs@vger.kernel.org, Sergei Trofimovich Subject: [PATCH] ioctl.h: add missing kernel compatibility header for BUILD_ASSERT Date: Mon, 24 Oct 2016 09:29:12 +0100 Message-Id: <20161024082912.20253-1-slyich@gmail.com> X-Mailer: git-send-email 2.10.1 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sergei Trofimovich Header breakage noticed by cynede. Reproducible as: $ gcc -c /usr/include/btrfs/ioctl.h -o /tmp/a.o /usr/include/btrfs/ioctl.h:42:14: error: expected declaration specifiers or '...' before 'sizeof' BUILD_ASSERT(sizeof(struct btrfs_ioctl_vol_args) == 4096); ^~~~~~ Basically gcc tries to say us BUILD_ASSERT is not visible. BUILD_ASSERT lives in kerncompat.h which this change adds. Reported-by: Mikhail Pukhlikov Signed-off-by: Sergei Trofimovich --- ioctl.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ioctl.h b/ioctl.h index 238e7ef..ee650a9 100644 --- a/ioctl.h +++ b/ioctl.h @@ -26,6 +26,12 @@ extern "C" { #include #include +#if BTRFS_FLAT_INCLUDES +#include "kerncompat.h" +#else +#include +#endif /* BTRFS_FLAT_INCLUDES */ + #ifndef __user #define __user #endif