From: Mikulas Patocka Date: Wed, 26 Apr 2023 12:31:10 +0000 (-0400) Subject: A small compile fix X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=4f6b28f54f09ee4498466d39cf550faeedd5614a;p=bcachefs-tools-debian 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 Signed-off-by: Kent Overstreet --- diff --git a/include/linux/bit_spinlock.h b/include/linux/bit_spinlock.h index ed47cc6..62b91af 100644 --- a/include/linux/bit_spinlock.h +++ b/include/linux/bit_spinlock.h @@ -4,6 +4,7 @@ #include #include #include +#include static inline void bit_spin_lock(int nr, unsigned long *_addr) {