From 42d7fd03366953cf72c8222cbf555e9466a37d95 Mon Sep 17 00:00:00 2001 From: Grzegorz Sluja <grzegorz.sluja@iopsys.eu> Date: Fri, 18 Dec 2020 17:05:19 +0100 Subject: [PATCH] Fix compilation issues Signed-off-by: Grzegorz Sluja <grzegorz.sluja@iopsys.eu> --- include/asterisk.h | 2 +- include/asterisk/astmm.h | 7 +++---- include/asterisk/frame.h | 4 ++++ include/asterisk/lock.h | 2 +- main/ast_expr2.y | 1 - 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/asterisk.h b/include/asterisk.h index 6a02908569..5fec339b97 100644 --- a/include/asterisk.h +++ b/include/asterisk.h @@ -47,7 +47,7 @@ #define DEFAULT_SAMPLES_PER_MS ((DEFAULT_SAMPLE_RATE)/1000) #define setpriority __PLEASE_USE_ast_set_priority_INSTEAD_OF_setpriority__ #define sched_setscheduler __PLEASE_USE_ast_set_priority_INSTEAD_OF_sched_setscheduler__ -#define strtok __PLEASE_USE_strtok_r_INSTEAD_OF_strtok__ +//#define strtok __PLEASE_USE_strtok_r_INSTEAD_OF_strtok__ #if defined(DEBUG_FD_LEAKS) && !defined(STANDALONE) && !defined(STANDALONE2) && !defined(STANDALONE_AEL) /* These includes are all about ordering */ diff --git a/include/asterisk/astmm.h b/include/asterisk/astmm.h index e1f91ddeab..07546eddfb 100644 --- a/include/asterisk/astmm.h +++ b/include/asterisk/astmm.h @@ -112,10 +112,9 @@ int __ast_repl_vasprintf(char **strp, const char *format, va_list ap, const char * }@ */ -#if !defined(ASTMM_LIBC) -/* BLOCK libc allocators by default. */ -#define ASTMM_LIBC ASTMM_BLOCK -#endif +/* Alway use libc allocators since the definitions in this file have conflicts with sched.h */ +#undef ASTMM_LIBC +#define ASTMM_LIBC ASTMM_IGNORE #if ASTMM_LIBC == ASTMM_IGNORE /* Don't touch the libc functions. */ diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h index 0e623d3311..f719f8966e 100644 --- a/include/asterisk/frame.h +++ b/include/asterisk/frame.h @@ -340,6 +340,10 @@ enum ast_control_frame_type { AST_CONTROL_RECORD_STOP = 1101, /*!< Indicated to a channel in record to stop recording */ AST_CONTROL_RECORD_SUSPEND = 1102, /*!< Indicated to a channel in record to suspend/unsuspend recording */ AST_CONTROL_RECORD_MUTE = 1103, /*!< Indicated to a channel in record to mute/unmute (i.e. write silence) recording */ + + /* Dial tone chnage */ + AST_CONTROL_NORMAL_DIALTONE = 1200, + AST_CONTROL_SPECIAL_DIALTONE = 1201, }; /*! diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h index 3cf6f16438..5809cc0d00 100644 --- a/include/asterisk/lock.h +++ b/include/asterisk/lock.h @@ -617,7 +617,7 @@ static void __attribute__((destructor)) fini_##rwlock(void) \ #define SCOPED_CHANNELLOCK(varname, chan) SCOPED_LOCK(varname, (chan), ast_channel_lock, ast_channel_unlock) #ifndef __CYGWIN__ /* temporary disabled for cygwin */ -#define pthread_mutex_t use_ast_mutex_t_instead_of_pthread_mutex_t +//#define pthread_mutex_t use_ast_mutex_t_instead_of_pthread_mutex_t #define pthread_cond_t use_ast_cond_t_instead_of_pthread_cond_t #endif #define pthread_mutex_lock use_ast_mutex_lock_instead_of_pthread_mutex_lock diff --git a/main/ast_expr2.y b/main/ast_expr2.y index b0b257d66a..e70390182a 100644 --- a/main/ast_expr2.y +++ b/main/ast_expr2.y @@ -12,7 +12,6 @@ * $FreeBSD: src/bin/expr/expr.y,v 1.16 2000/07/22 10:59:36 se Exp $ */ -#define ASTMM_LIBC ASTMM_REDIRECT #include "asterisk.h" #include <sys/types.h> -- GitLab