diff --git a/lib/context.c b/lib/context.c
index 1958a09926d67f30e11fcc3a7d06e48a5d2f3aa0..131fb0824517e0155a36eb7bac78d038b284972c 100644
--- a/lib/context.c
+++ b/lib/context.c
@@ -40,6 +40,7 @@ lws_get_library_version(void)
 	return library_version;
 }
 
+#if !defined(LWS_WITH_NO_LOGS)
 static const char * const mount_protocols[] = {
 	"http://",
 	"https://",
@@ -49,6 +50,7 @@ static const char * const mount_protocols[] = {
 	">https://",
 	"callback://"
 };
+#endif
 
 LWS_VISIBLE void *
 lws_protocol_vh_priv_zalloc(struct lws_vhost *vhost, const struct lws_protocols *prot,