diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/crush/crush.c | 12 | ||||
-rw-r--r-- | src/crush/mapper.c | 29 |
2 files changed, 13 insertions, 28 deletions
diff --git a/src/crush/crush.c b/src/crush/crush.c index 0790b80facc..80bda0082be 100644 --- a/src/crush/crush.c +++ b/src/crush/crush.c @@ -1,12 +1,8 @@ -#ifdef __KERNEL__ -# include <linux/slab.h> -#else -# include <stdlib.h> -# include <assert.h> -# define kfree(x) do { if (x) free(x); } while (0) -# define BUG_ON(x) assert(!(x)) -#endif +#include <stdlib.h> +#include <assert.h> +#define kfree(x) do { if (x) free(x); } while (0) +#define BUG_ON(x) assert(!(x)) #include "crush.h" diff --git a/src/crush/mapper.c b/src/crush/mapper.c index 22c0b4933d0..e88410c1b7b 100644 --- a/src/crush/mapper.c +++ b/src/crush/mapper.c @@ -1,24 +1,13 @@ -#ifdef __KERNEL__ -# include <linux/string.h> -# include <linux/slab.h> -# include <linux/bug.h> -# include <linux/kernel.h> -# include <linux/errno.h> -# ifndef dprintk -# define dprintk(args...) -# endif -#else -# include <string.h> -# include <stdio.h> -# include <stdlib.h> -# include <assert.h> -# include <errno.h> -# define BUG_ON(x) assert(!(x)) -# define dprintk(args...) /* printf(args) */ -# define kmalloc(x, f) malloc(x) -# define kfree(x) free(x) -#endif +#include <string.h> +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> +#include <errno.h> +#define BUG_ON(x) assert(!(x)) +#define dprintk(args...) /* printf(args) */ +#define kmalloc(x, f) malloc(x) +#define kfree(x) free(x) #include "crush.h" #include "hash.h" |