diff --git a/sql/log.cc b/sql/log.cc
index ebd1d10d8b7c17dc91cdcd0994917725a1807420..d67d77c8609071a6b437b5942ce63f2079c4ab09 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -2385,6 +2385,12 @@ void print_buffer_to_nt_eventlog(enum loglevel level, char *buff,
     void
 */
 
+#ifdef EMBEDDED_LIBRARY
+void vprint_msg_to_log(enum loglevel level __attribute__((unused)),
+                       const char *format __attribute__((unused)),
+                       va_list argsi __attribute__((unused)))
+{}
+#else /*!EMBEDDED_LIBRARY*/
 void vprint_msg_to_log(enum loglevel level, const char *format, va_list args)
 {
   char   buff[1024];
@@ -2400,6 +2406,7 @@ void vprint_msg_to_log(enum loglevel level, const char *format, va_list args)
 
   DBUG_VOID_RETURN;
 }
+#endif /*EMBEDDED_LIBRARY*/
 
 
 void sql_print_error(const char *format, ...)