From: slyich@gmail.com
To: David Sterba <dsterba@suse.cz>
Cc: linux-btrfs@vger.kernel.org, Sergei Trofimovich <slyfox@gentoo.org>
Subject: [PATCH] ioctl.h: add missing kernel compatibility header for BUILD_ASSERT
Date: Mon, 24 Oct 2016 09:29:12 +0100 [thread overview]
Message-ID: <20161024082912.20253-1-slyich@gmail.com> (raw)
From: Sergei Trofimovich <slyfox@gentoo.org>
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 <cynede@gentoo.org>
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
---
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 <asm/types.h>
#include <linux/ioctl.h>
+#if BTRFS_FLAT_INCLUDES
+#include "kerncompat.h"
+#else
+#include <btrfs/kerncompat.h>
+#endif /* BTRFS_FLAT_INCLUDES */
+
#ifndef __user
#define __user
#endif
--
2.10.1
next reply other threads:[~2016-10-24 8:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-24 8:29 slyich [this message]
2016-10-24 12:52 ` [PATCH] ioctl.h: add missing kernel compatibility header for BUILD_ASSERT David Sterba
2016-11-12 22:14 ` Sergei Trofimovich
2016-11-14 12:34 ` David Sterba
2016-11-14 15:50 ` David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161024082912.20253-1-slyich@gmail.com \
--to=slyich@gmail.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=slyfox@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox