From 2fcade61f7cd3dd5fb9d42622b4ecefdc1248460 Mon Sep 17 00:00:00 2001 From: sageweil Date: Thu, 22 Nov 2007 06:46:15 +0000 Subject: [PATCH] crush compiles in kernel; removed cygwin cruft, who cares git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2109 29311d96-e01e-0410-9327-a35deaab8ce9 --- trunk/ceph/crush/crush.c | 1 + trunk/ceph/crush/crush.h | 10 ++-------- trunk/ceph/crush/mapper.c | 10 ++++++++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/trunk/ceph/crush/crush.c b/trunk/ceph/crush/crush.c index fd274145959ff..78c581c0b48e8 100644 --- a/trunk/ceph/crush/crush.c +++ b/trunk/ceph/crush/crush.c @@ -1,5 +1,6 @@ #ifdef __KERNEL__ +# include # define free(x) kfree(x) #else # include diff --git a/trunk/ceph/crush/crush.h b/trunk/ceph/crush/crush.h index 48eeede4a161f..ec1901f00281f 100644 --- a/trunk/ceph/crush/crush.h +++ b/trunk/ceph/crush/crush.h @@ -5,15 +5,9 @@ extern "C" { #endif -#ifdef __CYGWIN__ -# include -# include -typedef uint64_t __u64; -#else -# include /* just for int types */ -#endif +#include /* just for int types */ -#ifndef BUG_ON +#ifndef __KERNEL__ # include # define BUG_ON(x) assert(!(x)) #endif diff --git a/trunk/ceph/crush/mapper.c b/trunk/ceph/crush/mapper.c index a4a0b71a2deb6..0737e8e6443c1 100644 --- a/trunk/ceph/crush/mapper.c +++ b/trunk/ceph/crush/mapper.c @@ -2,8 +2,14 @@ #include "crush.h" #include "hash.h" -#include -#include +#ifdef __KERNEL__ +# include +# include +# include +#else +# include +# include +#endif /** bucket choose methods **/ -- 2.39.5