summaryrefslogtreecommitdiff
path: root/kerncompat.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-10-10 09:59:18 +0200
committerDavid Sterba <dsterba@suse.com>2016-10-10 10:11:31 +0200
commit5aade6f9c319d8c8d3aa919fe2f5d35f37d7d874 (patch)
tree211f8795b9c4a3d73db80851245d0b2fbc682e02 /kerncompat.h
parent805ac27248a9428d23031931e6dc6098c5a1d678 (diff)
btrfs-progs: ioctl: make build-time structure size checks optional
Temporarily make the build checks optional. The structure sizes could change on arches due to alignment requirements or padding inserted into the structures. We need more extensive tests to make sure we'd not break ioctls. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'kerncompat.h')
-rw-r--r--kerncompat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/kerncompat.h b/kerncompat.h
index 4a8f8135..ed9a0425 100644
--- a/kerncompat.h
+++ b/kerncompat.h
@@ -70,7 +70,11 @@
#define __token_glue(a,b,c) ___token_glue(a,b,c)
#define ___token_glue(a,b,c) a ## b ## c
+#ifdef DEBUG_BUILD_CHECKS
#define BUILD_ASSERT(x) extern int __token_glue(compile_time_assert_,__LINE__,__COUNTER__)[1-2*!(x)] __attribute__((unused))
+#else
+#define BUILD_ASSERT(x)
+#endif
#ifndef BTRFS_DISABLE_BACKTRACE
#define MAX_BACKTRACE 16