]> git.sesse.net Git - bcachefs-tools-debian/commit
A small compile fix
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 26 Apr 2023 12:31:10 +0000 (08:31 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 26 Apr 2023 14:44:49 +0000 (10:44 -0400)
commit4f6b28f54f09ee4498466d39cf550faeedd5614a
treec1f798188ca1b6e3f0bae4e6b90eb07046bfc571
parent693e278c14efae893a6f051446fbbc0cf5e408cd
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>
include/linux/bit_spinlock.h