diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2023-04-26 08:31:10 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-04-26 10:44:49 -0400 |
commit | 4f6b28f54f09ee4498466d39cf550faeedd5614a (patch) | |
tree | c1f798188ca1b6e3f0bae4e6b90eb07046bfc571 | |
parent | 693e278c14efae893a6f051446fbbc0cf5e408cd (diff) | |
download | bcachefs-tools-4f6b28f54f09ee4498466d39cf550faeedd5614a.tar.gz |
A small compile fix
Hi
Here I'm sending a small compile fix for bcachefs-tools.
Without this patch, I get this error:
cargo build --release --manifest-path rust-src/Cargo.toml
Compiling bch_bindgen v0.1.0
(/usr/src/git/bcachefs-tools/rust-src/bch_bindgen)
error: failed to run custom build command for `bch_bindgen v0.1.0
(/usr/src/git/bcachefs-tools/rust-src/bch_bindgen)`
Caused by:
process didn't exit successfully:
`/usr/src/git/bcachefs-tools/rust-src/target/release/build/bch_bindgen-733e88995ce9eab7/build-script-build`
(exit status: 101)
--- stderr
warning: optimization flag '-fkeep-inline-functions' is not supported
[-Wignored-optimization-argument]
../../include/linux/bit_spinlock.h:20:3: error: call to undeclared
function 'futex'; ISO C99 and later do not support implicit function
declarations [-Wimplicit-function-declaration]
../../include/linux/bit_spinlock.h:28:2: error: call to undeclared
function 'futex'; ISO C99 and later do not support implicit function
declarations [-Wimplicit-function-declaration]
../../include/linux/bit_spinlock.h:39:2: error: call to undeclared
function 'futex'; ISO C99 and later do not support implicit function
declarations [-Wimplicit-function-declaration]
The futex() function is declared in
/usr/include/x86_64-linux-gnu/urcu/futex.h
It is not declared in linux/futex.h, so we need to include urcu/futex.h
Mikulas
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | include/linux/bit_spinlock.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bit_spinlock.h b/include/linux/bit_spinlock.h index ed47cc63..62b91afa 100644 --- a/include/linux/bit_spinlock.h +++ b/include/linux/bit_spinlock.h @@ -4,6 +4,7 @@ #include <linux/kernel.h> #include <linux/preempt.h> #include <linux/futex.h> +#include <urcu/futex.h> static inline void bit_spin_lock(int nr, unsigned long *_addr) { |