aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/asterisk.h6
-rw-r--r--include/asterisk/abstract_jb.h1
-rw-r--r--include/asterisk/compat.h10
-rw-r--r--include/asterisk/lock.h2
-rw-r--r--utils/extconf.c2
5 files changed, 10 insertions, 11 deletions
diff --git a/include/asterisk.h b/include/asterisk.h
index d4b2f0391..da70e8a8c 100644
--- a/include/asterisk.h
+++ b/include/asterisk.h
@@ -68,12 +68,6 @@ void ast_event_init(void); /*!< Provided by event.c */
int ast_device_state_engine_init(void); /*!< Provided by devicestate.c */
int astobj2_init(void); /*! Provided by astobj2.c */
-/* Many headers need 'ast_channel' to be defined */
-struct ast_channel;
-
-/* Many headers need 'ast_module' to be defined */
-struct ast_module;
-
/*!
* \brief Reload asterisk modules.
* \param name the name of the module to reload
diff --git a/include/asterisk/abstract_jb.h b/include/asterisk/abstract_jb.h
index 1bd9dc84d..4a41c8c2c 100644
--- a/include/asterisk/abstract_jb.h
+++ b/include/asterisk/abstract_jb.h
@@ -36,7 +36,6 @@
extern "C" {
#endif
-struct ast_channel;
struct ast_frame;
/* Configuration flags */
diff --git a/include/asterisk/compat.h b/include/asterisk/compat.h
index d918cd707..19ae6e9b1 100644
--- a/include/asterisk/compat.h
+++ b/include/asterisk/compat.h
@@ -176,4 +176,14 @@ typedef unsigned int u_int32_t;
typedef unsigned long long uint64_t;
#endif
+/*! \brief
+ * Definition of various structures that many asterisk files need,
+ * but only because they need to know that the type exists.
+ *
+ * We can move them to a different global header if necessary.
+ */
+struct ast_channel;
+struct ast_frame;
+struct ast_module;
+
#endif
diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h
index 16ce5bb67..055ec84c8 100644
--- a/include/asterisk/lock.h
+++ b/include/asterisk/lock.h
@@ -1185,8 +1185,6 @@ AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
#define ast_channel_trylock(x) ast_mutex_trylock(&x->lock_dont_use)
#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);
diff --git a/utils/extconf.c b/utils/extconf.c
index 0e4071833..caed90478 100644
--- a/utils/extconf.c
+++ b/utils/extconf.c
@@ -1835,8 +1835,6 @@ AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
#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);