*
*/
-#include "asterisk/autoconfig.h"
+#include "asterisk/compat.h"
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
#include <errno.h>
#include <time.h>
#include <sys/stat.h>
#include "asterisk/inline_api.h"
-#include "asterisk/compat.h"
-#include "asterisk/compiler.h"
#include "asterisk/endian.h"
#include "asterisk/ast_expr.h"
#include "asterisk/ael_structs.h"
/* Asterisk REQUIRES recursive (not error checking) mutexes
and will not run without them. */
-#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) && defined(PTHREAD_MUTEX_RECURSIVE_NP)
#define PTHREAD_MUTEX_INIT_VALUE PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
#define AST_MUTEX_KIND PTHREAD_MUTEX_RECURSIVE_NP
#else
#define ast_channel_trylock(x) ast_mutex_trylock(&x->lock)
#else
-struct ast_channel;
-
/*! \brief Lock AST channel (and print debugging output)
\note You need to enable DEBUG_CHANNEL_LOCKS for this function */
int ast_channel_lock(struct ast_channel *chan);
if (use_local_dir)
snprintf(fn, sizeof(fn), "./%s", filename);
else
- snprintf(fn, sizeof(fn), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, filename);
+ snprintf(fn, sizeof(fn), "%s/%s", ast_config_AST_CONFIG_DIR, filename);
}
if (withcomments && cfg && cfg->include_level < 2 ) {