diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h
index fd7063c216f0b0ba0c25ac5cf700bf3306d6a8ca..359c7b8aa0c123c88fc22cdcfe5a2f3d7cde2203 100644
--- a/src/include/lib/simplehash.h
+++ b/src/include/lib/simplehash.h
@@ -88,8 +88,11 @@
 #define SH_ENTRY_HASH SH_MAKE_NAME(entry_hash)
 
 /* Allocation function for hash table elements */
+#ifndef SIMPLEHASH_TYPEDEFS
+#define SIMPLEHASH_TYPEDEFS
 typedef void *(*simplehash_allocate) (Size size, void *args);
 typedef void (*simplehash_free) (void *pointer, void *args);
+#endif
 
 /* generate forward declarations necessary to use the hash table */
 #ifdef SH_DECLARE