btrfs-progs: ioctl: fix build failure if BUILD_ASSERT is not defined

The build fails if ioctl.h is included without kerncompat.h which
defines BUILD_ASSERT, as reported. The proposed patches add kerncompat.h
but I don't want to pull that header via ioctl.h, so the fix will
provide an empty macro instead.

Reported-by: Eric Sandeen <sandeen@redhat.com>
Reported-by: Sergei Trofimovich <slyfox@gentoo.org>
Reported-by: Mikhail Pukhlikov <cynede@gentoo.org>
Signed-off-by: David Sterba <dsterba@suse.com>
master
David Sterba 2016-10-24 14:46:26 +02:00
parent 36d02f3eb8
commit b2fbfc8cdd
1 changed files with 5 additions and 0 deletions

View File

@ -30,6 +30,11 @@ extern "C" {
#define __user
#endif
/* We don't want to include entire kerncompat.h */
#ifndef BUILD_ASSERT
#define BUILD_ASSERT(x)
#endif
#define BTRFS_IOCTL_MAGIC 0x94
#define BTRFS_VOL_NAME_MAX 255