diff --git a/src/hashtable.h b/src/hashtable.h
index 14f68c9bb9f183a742b64e11f11356164bea5bb8..ff9caa9036040f20a1e3d77f5f68a84d4333aa30 100644
--- a/src/hashtable.h
+++ b/src/hashtable.h
@@ -31,6 +31,15 @@ struct hash_table
   struct hash_entry *htable[1];
 };
 
+/* Remap some of the symbols that might clash with other libraries.
+ *
+ * NB: hash_insert is known to clash with mariadb-connector-c 2.2.
+ */
+#define hash_lookup	pike_hash_lookup
+#define hash_rehash	pike_hash_rehash
+#define hash_insert	pike_hash_insert
+#define hash_unlink	pike_hash_unlink
+
 /* Prototypes begin here */
 struct hash_entry *hash_lookup(const struct hash_table *h,
                                const struct pike_string *s);