]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crush compiles in kernel; removed cygwin cruft, who cares
authorsageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Thu, 22 Nov 2007 06:46:15 +0000 (06:46 +0000)
committersageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Thu, 22 Nov 2007 06:46:15 +0000 (06:46 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@2109 29311d96-e01e-0410-9327-a35deaab8ce9

trunk/ceph/crush/crush.c
trunk/ceph/crush/crush.h
trunk/ceph/crush/mapper.c

index fd274145959ff3262b0229e2bbf3a9a3611a75a3..78c581c0b48e8b1fd12955588557b3e563a8ab2d 100644 (file)
@@ -1,5 +1,6 @@
 
 #ifdef __KERNEL__
+# include <linux/slab.h>
 # define free(x) kfree(x)
 #else
 # include <stdlib.h>
index 48eeede4a161f3f4b353fda0f3275d5d1a3d3662..ec1901f00281f18ee2e71408108673944dcf3add 100644 (file)
@@ -5,15 +5,9 @@
 extern "C" {
 #endif
 
-#ifdef __CYGWIN__
-# include <asm/types.h>
-# include <inttypes.h>
-typedef uint64_t __u64;
-#else 
-# include <linux/types.h>  /* just for int types */
-#endif
+#include <linux/types.h>  /* just for int types */
 
-#ifndef BUG_ON
+#ifndef __KERNEL__
 # include <assert.h>
 # define BUG_ON(x) assert(!(x))
 #endif
index a4a0b71a2deb62d3d55266b1f10d7967e025b1d8..0737e8e6443c1bf666e48ba49204df11c7c521b5 100644 (file)
@@ -2,8 +2,14 @@
 #include "crush.h"
 #include "hash.h"
 
-#include <string.h>
-#include <stdio.h>
+#ifdef __KERNEL__
+# include <linux/string.h>
+# include <linux/slab.h>
+# include <asm/bug.h>
+#else
+# include <string.h>
+# include <stdio.h>
+#endif
 
 /** bucket choose methods **/