mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 20:54:10 +08:00
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>
This commit is contained in:
parent
023f9ac9f7
commit
44fd13a4c6
@ -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;
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user