diff --git a/libs/spandsp/src/fax_modems.c b/libs/spandsp/src/fax_modems.c
index 74d71ecc29..b32fba7ada 100644
--- a/libs/spandsp/src/fax_modems.c
+++ b/libs/spandsp/src/fax_modems.c
@@ -152,7 +152,7 @@ SPAN_DECLARE(const char *) fax_modem_to_str(int modem)
 /*- End of function --------------------------------------------------------*/
 
 //static void fax_modems_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok)
-SPAN_DECLARE(void) fax_modems_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok)
+SPAN_DECLARE_NONSTD(void) fax_modems_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok)
 {
     fax_modems_state_t *s;
 
diff --git a/libs/spandsp/src/spandsp/fax_modems.h b/libs/spandsp/src/spandsp/fax_modems.h
index 3a6adf28c1..6edfa967e7 100644
--- a/libs/spandsp/src/spandsp/fax_modems.h
+++ b/libs/spandsp/src/spandsp/fax_modems.h
@@ -59,7 +59,7 @@ extern "C"
 {
 #endif
 
-SPAN_DECLARE(void) fax_modems_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok);
+SPAN_DECLARE_NONSTD(void) fax_modems_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok);
 
 /*! Convert a FAX modem type to a short text description.
     \brief Convert a FAX modem type to a short text description.