diff --git a/lib/strequal.c b/lib/strequal.c
index f993e382ab847b130bcc877b3a9e9894408497c0..34f95fd90b1696ee655c1ed427a16524fd9cc6d3 100644
--- a/lib/strequal.c
+++ b/lib/strequal.c
@@ -28,7 +28,7 @@
 
 #include "strequal.h"
 
-#ifdef HAVE_STRCASECMP
+#if defined(HAVE_STRCASECMP) && defined(__STRICT_ANSI__)
 /* this is for "-ansi -Wall -pedantic" to stop complaining! */
 extern int (strcasecmp)(const char *s1, const char *s2);
 extern int (strncasecmp)(const char *s1, const char *s2, size_t n);