diff --git a/libs/freetdm/src/include/ftdm_os.h b/libs/freetdm/src/include/ftdm_os.h index 8308e70705..5026bb7236 100644 --- a/libs/freetdm/src/include/ftdm_os.h +++ b/libs/freetdm/src/include/ftdm_os.h @@ -67,6 +67,9 @@ extern "C" { /*! \brief check for zero length string buffer */ #define ftdm_strlen_zero_buf(s) (*s == '\0') +/*! \brief array len helper */ +#define ftdm_array_len(array) sizeof(array)/sizeof(array[0]) + /*! \brief The memory handler. Do not use directly this variable, use the memory macros and ftdm_global_set_memory_handler to override */ FT_DECLARE_DATA extern ftdm_memory_handler_t g_ftdm_mem_handler; diff --git a/libs/freetdm/src/include/private/ftdm_core.h b/libs/freetdm/src/include/private/ftdm_core.h index 560f0c4184..77e0e29587 100644 --- a/libs/freetdm/src/include/private/ftdm_core.h +++ b/libs/freetdm/src/include/private/ftdm_core.h @@ -589,8 +589,6 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_queue_dtmf(ftdm_channel_t *ftdmchan, cons */ #define ftdm_socket_close(it) if (it > -1) { close(it); it = -1;} -#define ftdm_array_len(array) sizeof(array)/sizeof(array[0]) - #define ftdm_channel_lock(chan) ftdm_mutex_lock(chan->mutex) #define ftdm_channel_unlock(chan) ftdm_mutex_unlock(chan->mutex) #define ftdm_log_chan_ex(fchan, file, func, line, level, format, ...) ftdm_log(file, func, line, level, "[s%dc%d][%d:%d] " format, fchan->span_id, fchan->chan_id, fchan->physical_span_id, fchan->physical_chan_id, __VA_ARGS__)