Whamcloud - gitweb
e2fsck: Change kmem_cache_t to lkmem_cache_t for Solaris
authorTheodore Ts'o <tytso@mit.edu>
Sun, 13 Jul 2008 12:04:36 +0000 (08:04 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 13 Jul 2008 20:06:56 +0000 (16:06 -0400)
Solaris polutes the C namespace with kmem_cache_t when
you include in/netinet.h is included, so rename kmem_cache_t
to lkmem_cache_t.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
e2fsck/jfs_user.h
e2fsck/revoke.c

index 22be945..f9e32b2 100644 (file)
@@ -50,7 +50,7 @@ extern e2fsck_t e2fsck_global_ctx;  /* Try your very best not to use this! */
 
 typedef struct {
        int     object_length;
-} kmem_cache_t;
+} lkmem_cache_t;
 
 #define kmem_cache_alloc(cache,flags) malloc((cache)->object_length)
 #define kmem_cache_free(cache,obj) free(obj)
@@ -74,8 +74,8 @@ typedef unsigned int __be32;
  * We use the standard libext2fs portability tricks for inline
  * functions.  
  */
-extern kmem_cache_t * do_cache_create(int len);
-extern void do_cache_destroy(kmem_cache_t *cache);
+extern lkmem_cache_t * do_cache_create(int len);
+extern void do_cache_destroy(lkmem_cache_t *cache);
 extern size_t journal_tag_bytes(journal_t *journal);
        
 #if (defined(E2FSCK_INCLUDE_INLINE_FUNCS) || !defined(NO_INLINE_FUNCS))
@@ -89,16 +89,16 @@ extern size_t journal_tag_bytes(journal_t *journal);
 #endif
 #endif
 
-_INLINE_ kmem_cache_t * do_cache_create(int len)
+_INLINE_ lkmem_cache_t * do_cache_create(int len)
 {
-       kmem_cache_t *new_cache;
+       lkmem_cache_t *new_cache;
        new_cache = malloc(sizeof(*new_cache));
        if (new_cache)
                new_cache->object_length = len;
        return new_cache;
 }
 
-_INLINE_ void do_cache_destroy(kmem_cache_t *cache)
+_INLINE_ void do_cache_destroy(lkmem_cache_t *cache)
 {
        free(cache);
 }
index bb4888d..1665099 100644 (file)
@@ -71,8 +71,8 @@
 #include <linux/init.h>
 #endif
 
-static kmem_cache_t *revoke_record_cache;
-static kmem_cache_t *revoke_table_cache;
+static lkmem_cache_t *revoke_record_cache;
+static lkmem_cache_t *revoke_table_cache;
 
 /* Each revoke record represents one single revoked block.  During
    journal replay, this involves recording the transaction ID of the