diff --git a/chacha-crypt.c b/chacha-crypt.c
index 5618109248a4280425dfd06e739e0bbb81164db7..0d6ecee128a00bf5b7adce0f8bfde1f1301cbf4f 100644
--- a/chacha-crypt.c
+++ b/chacha-crypt.c
@@ -60,6 +60,8 @@
 #define _chacha_crypt_3core chacha_crypt
 #define _chacha_crypt32_3core chacha_crypt32
 #elif HAVE_NATIVE_chacha_2core
+#undef _chacha_crypt_2core
+#undef _chacha_crypt32_2core
 #define _chacha_crypt_2core chacha_crypt
 #define _chacha_crypt32_2core chacha_crypt32
 #elif !(HAVE_NATIVE_fat_chacha_3core || HAVE_NATIVE_fat_chacha_2core)