summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-12-21 19:49:00 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-12-21 19:49:00 -0500
commit596ec1050d0ce55f5e2d38aa8cdcb46d92178140 (patch)
tree26663d05f54f61c99fc4843f066beebae53add29
parent93241a1c9a7dbef987f524a9dea3fc61e87e845b (diff)
Update bcachefs sources to df6415fefb27 bcachefs: Fixes for rust bindgen
-rw-r--r--.bcachefs_revision2
-rw-r--r--libbcachefs/mean_and_variance.h5
-rw-r--r--libbcachefs/subvolume_types.h4
3 files changed, 9 insertions, 2 deletions
diff --git a/.bcachefs_revision b/.bcachefs_revision
index 1a2b5b17..f6757060 100644
--- a/.bcachefs_revision
+++ b/.bcachefs_revision
@@ -1 +1 @@
-5d0a6c2b32f1542f01e47e767b0174de788dd8cc
+df6415fefb2790c3b95fa87ead779e7d2c654379
diff --git a/libbcachefs/mean_and_variance.h b/libbcachefs/mean_and_variance.h
index 64750501..b2be565b 100644
--- a/libbcachefs/mean_and_variance.h
+++ b/libbcachefs/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;
diff --git a/libbcachefs/subvolume_types.h b/libbcachefs/subvolume_types.h
index 2d2e66a4..ae644adf 100644
--- a/libbcachefs/subvolume_types.h
+++ b/libbcachefs/subvolume_types.h
@@ -20,7 +20,11 @@ struct snapshot_t {
};
struct snapshot_table {
+#ifndef RUST_BINDGEN
DECLARE_FLEX_ARRAY(struct snapshot_t, s);
+#else
+ struct snapshot_t s[0];
+#endif
};
typedef struct {