Fixes so "make allnoconfig" works again.
[oweals/busybox.git] / libbb / inode_hash.c
index 52c54cdc17422e9f91153e57e31013aa97dcff6e..fbcd813277b8db911832a6174cce562b81462364 100644 (file)
@@ -2,8 +2,8 @@
 /*
  * Utility routines.
  *
- * Copyright (C) many different people.  If you wrote this, please
- * acknowledge your work.
+ * Copyright (C) many different people.
+ * If you wrote this, please acknowledge your work.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 #define HASH_SIZE      311             /* Should be prime */
 #define hash_inode(i)  ((i) % HASH_SIZE)
 
+typedef struct ino_dev_hash_bucket_struct {
+  struct ino_dev_hash_bucket_struct *next;
+  ino_t ino;
+  dev_t dev;
+  char name[1];
+} ino_dev_hashtable_bucket_t;
+
 static ino_dev_hashtable_bucket_t *ino_dev_hashtable[HASH_SIZE];
 
 /*
@@ -62,7 +69,7 @@ void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name)
        int i;
        size_t s;
        ino_dev_hashtable_bucket_t *bucket;
-    
+
        i = hash_inode(statbuf->st_ino);
        s = name ? strlen(name) : 0;
        bucket = xmalloc(sizeof(ino_dev_hashtable_bucket_t) + s);
@@ -76,6 +83,7 @@ void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name)
        ino_dev_hashtable[i] = bucket;
 }
 
+#ifdef CONFIG_FEATURE_CLEAN_UP
 /* Clear statbuf hash table */
 void reset_ino_dev_hashtable(void)
 {
@@ -90,6 +98,7 @@ void reset_ino_dev_hashtable(void)
                }
        }
 }
+#endif
 
 
 /* END CODE */