From 2907a4824fd713342249a059095d47ecf22e836b Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 21 Feb 2014 15:48:45 -0500 Subject: [PATCH] disable modem functionality on openbsd --- src/mod/applications/mod_spandsp/mod_spandsp.c | 5 ++++- src/mod/applications/mod_spandsp/mod_spandsp_modem.h | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mod/applications/mod_spandsp/mod_spandsp.c b/src/mod/applications/mod_spandsp/mod_spandsp.c index 4ba4cc4500..41d7212601 100644 --- a/src/mod/applications/mod_spandsp/mod_spandsp.c +++ b/src/mod/applications/mod_spandsp/mod_spandsp.c @@ -801,8 +801,9 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_spandsp_init) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n"); } - +#if defined(MODEM_SUPPORT) modem_global_init(module_interface, pool); +#endif switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "mod_spandsp loaded, using spandsp library version [%s]\n", SPANDSP_RELEASE_DATETIME_STRING); @@ -817,7 +818,9 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_spandsp_shutdown) mod_spandsp_fax_shutdown(); mod_spandsp_dsp_shutdown(); +#if defined(MODEM_SUPPORT) modem_global_shutdown(); +#endif if (spandsp_globals.tones) { switch_core_hash_destroy(&spandsp_globals.tones); diff --git a/src/mod/applications/mod_spandsp/mod_spandsp_modem.h b/src/mod/applications/mod_spandsp/mod_spandsp_modem.h index 6e76a76132..6347d5cb90 100644 --- a/src/mod/applications/mod_spandsp/mod_spandsp_modem.h +++ b/src/mod/applications/mod_spandsp/mod_spandsp_modem.h @@ -35,7 +35,7 @@ #undef HAVE_STDLIB_H #include "switch_private.h" #endif -#if defined(HAVE_OPENPTY) || defined(HAVE_DEV_PTMX) || defined(HAVE_POSIX_OPENPT) || WIN32 +#if !defined(__OpenBSD__) && (defined(HAVE_OPENPTY) || defined(HAVE_DEV_PTMX) || defined(HAVE_POSIX_OPENPT) || WIN32) #define MODEM_SUPPORT 1 #if !defined(HAVE_POSIX_OPENPT) && !defined(HAVE_DEV_PTMX) && !defined(WIN32) #define USE_OPENPTY 1 @@ -55,6 +55,7 @@ #include #elif defined(__SunOS) #include +#elif defined(__OpenBSD__) #else #include #endif