Add missing cred.h functions

Resolve compiler warning with kmem_free (unused len)
Add stub for byteorder.h
Add zlib shim for compress2 and uncompress functions



git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@29 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
This commit is contained in:
behlendo
2008-03-07 20:48:44 +00:00
parent b0dd3380aa
commit 3b3ba48fe9
5 changed files with 163 additions and 8 deletions
+6 -2
View File
@@ -58,7 +58,7 @@ extern unsigned int kmem_alloc_max;
#define kmem_free(ptr, size) \
({ \
BUG_ON(!ptr); \
BUG_ON(!ptr || size < 0); \
atomic_sub((size), &kmem_alloc_used); \
memset(ptr, 0x5a, (size)); /* Poison */ \
kfree(ptr); \
@@ -70,7 +70,11 @@ extern unsigned int kmem_alloc_max;
#define kmem_alloc(size, flags) kmalloc(size, flags)
#define kmem_zalloc(size, flags) kzalloc(size, flags)
#define kmem_free(ptr, size) kfree(ptr)
#define kmem_free(ptr, size) \
({ \
BUG_ON(!ptr || size < 0); \
kfree(ptr); \
})
#endif /* DEBUG_KMEM */