mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-25 07:32:22 +00:00
btrfs-progs: include kerncompat.h in raid6.c, define __attribute_const__
raid6.c was failing to build for Goffredo and me due to __attribute_const__ being undefined. Define it in kerncompat.h and include that; this also makes sure BITS_PER_LONG is defined for raid6.c, prior to this it was not defined, at least in my build. Finally, redefine BITS_PER_LONG in a way that it can be tested in the preprocessor macro. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
This commit is contained in:
parent
4d48b96b28
commit
5ffe6597e7
@ -36,7 +36,7 @@
|
||||
#define gfp_t int
|
||||
#define get_cpu_var(p) (p)
|
||||
#define __get_cpu_var(p) (p)
|
||||
#define BITS_PER_LONG (sizeof(long) * 8)
|
||||
#define BITS_PER_LONG (__SIZEOF_LONG__ * 8)
|
||||
#define __GFP_BITS_SHIFT 20
|
||||
#define __GFP_BITS_MASK ((int)((1 << __GFP_BITS_SHIFT) - 1))
|
||||
#define GFP_KERNEL 0
|
||||
@ -126,6 +126,10 @@ static inline int mutex_is_locked(struct mutex *m)
|
||||
#define BITOP_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
|
||||
#define BITOP_WORD(nr) ((nr) / BITS_PER_LONG)
|
||||
|
||||
#ifndef __attribute_const__
|
||||
#define __attribute_const__ __attribute__((__const__))
|
||||
#endif
|
||||
|
||||
/**
|
||||
* __set_bit - Set a bit in memory
|
||||
* @nr: the bit to set
|
||||
|
Loading…
Reference in New Issue
Block a user