summaryrefslogtreecommitdiff
path: root/fs/bcachefs/mean_and_variance.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-12-22 03:47:55 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-01 19:47:42 +0300
commit44fd13a4c68e87953ccd827e764fa566ddcbbcf5 (patch)
tree9721daba28e566f2e571351315c7cd1db744eb3e /fs/bcachefs/mean_and_variance.h
parent023f9ac9f70fbb1d94d27583fc06225355c73a67 (diff)
downloadlinux-44fd13a4c68e87953ccd827e764fa566ddcbbcf5.tar.xz
bcachefs: Fixes for rust bindgen
bindgen doesn't seem to like u128 or DECLARE_FLEX_ARRAY(), but we can hack around them. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/mean_and_variance.h')
-rw-r--r--fs/bcachefs/mean_and_variance.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/bcachefs/mean_and_variance.h b/fs/bcachefs/mean_and_variance.h
index 647505010b39..b2be565bb8f2 100644
--- a/fs/bcachefs/mean_and_variance.h
+++ b/fs/bcachefs/mean_and_variance.h
@@ -12,9 +12,12 @@
/*
* u128_u: u128 user mode, because not all architectures support a real int128
* type
+ *
+ * We don't use this version in userspace, because in userspace we link with
+ * Rust and rustc has issues with u128.
*/
-#ifdef __SIZEOF_INT128__
+#if defined(__SIZEOF_INT128__) && defined(__KERNEL__)
typedef struct {
unsigned __int128 v;