linux-bcachefs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] A small compile fix
@ 2023-04-26 12:31 Mikulas Patocka
  2023-04-26 14:33 ` Kent Overstreet
  0 siblings, 1 reply; 4+ messages in thread
From: Mikulas Patocka @ 2023-04-26 12:31 UTC (permalink / raw)
  To: Kent Overstreet; +Cc: linux-bcachefs

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


---
 include/linux/bit_spinlock.h |    1 +
 1 file changed, 1 insertion(+)

Index: bcachefs-tools/include/linux/bit_spinlock.h
===================================================================
--- bcachefs-tools.orig/include/linux/bit_spinlock.h
+++ bcachefs-tools/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)
 {


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] A small compile fix
  2023-04-26 12:31 [PATCH] A small compile fix Mikulas Patocka
@ 2023-04-26 14:33 ` Kent Overstreet
  2023-04-26 14:40   ` Mikulas Patocka
  0 siblings, 1 reply; 4+ messages in thread
From: Kent Overstreet @ 2023-04-26 14:33 UTC (permalink / raw)
  To: Mikulas Patocka; +Cc: linux-bcachefs

On Wed, Apr 26, 2023 at 08:31:10AM -0400, Mikulas Patocka wrote:
> Hi
> 
> Here I'm sending a small compile fix for bcachefs-tools.

Signed-off-by?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] A small compile fix
  2023-04-26 14:33 ` Kent Overstreet
@ 2023-04-26 14:40   ` Mikulas Patocka
  2023-04-26 14:45     ` Kent Overstreet
  0 siblings, 1 reply; 4+ messages in thread
From: Mikulas Patocka @ 2023-04-26 14:40 UTC (permalink / raw)
  To: Kent Overstreet; +Cc: linux-bcachefs



On Wed, 26 Apr 2023, Kent Overstreet wrote:

> On Wed, Apr 26, 2023 at 08:31:10AM -0400, Mikulas Patocka wrote:
> > Hi
> > 
> > Here I'm sending a small compile fix for bcachefs-tools.
> 
> Signed-off-by?

Yes, you can add

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

Mikulas


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] A small compile fix
  2023-04-26 14:40   ` Mikulas Patocka
@ 2023-04-26 14:45     ` Kent Overstreet
  0 siblings, 0 replies; 4+ messages in thread
From: Kent Overstreet @ 2023-04-26 14:45 UTC (permalink / raw)
  To: Mikulas Patocka; +Cc: linux-bcachefs

On Wed, Apr 26, 2023 at 10:40:27AM -0400, Mikulas Patocka wrote:
> 
> 
> On Wed, 26 Apr 2023, Kent Overstreet wrote:
> 
> > On Wed, Apr 26, 2023 at 08:31:10AM -0400, Mikulas Patocka wrote:
> > > Hi
> > > 
> > > Here I'm sending a small compile fix for bcachefs-tools.
> > 
> > Signed-off-by?
> 
> Yes, you can add
> 
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> 
> Mikulas

Thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-04-26 14:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-26 12:31 [PATCH] A small compile fix Mikulas Patocka
2023-04-26 14:33 ` Kent Overstreet
2023-04-26 14:40   ` Mikulas Patocka
2023-04-26 14:45     ` Kent Overstreet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).