Skip to content
Snippets Groups Projects
Commit 7dc56a0c authored by Russell Bryant's avatar Russell Bryant
Browse files

Fix build issues on Solaris and OpenBSD.

(closes issue #14512)
Reported by: snuffy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@177855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 5b497da1
Branches
Tags
No related merge requests found
...@@ -178,17 +178,6 @@ int ast_tone_zone_count(void); ...@@ -178,17 +178,6 @@ int ast_tone_zone_count(void);
*/ */
struct ao2_iterator ast_tone_zone_iterator_init(void); struct ao2_iterator ast_tone_zone_iterator_init(void);
extern struct ast_tone_zone __fake_tone_zone;
extern struct ast_tone_zone_sound __fake_tone_zone_sound;
#define AST_CHECK_TONE_ZONE(tz) do { \
(void) ((tz) == (&__fake_tone_zone)); \
} while (0)
#define AST_CHECK_TONE_ZONE_SOUND(ts) do { \
(void) ((ts) == (&__fake_tone_zone_sound)); \
} while (0)
/*! /*!
* \brief Lock an ast_tone_zone * \brief Lock an ast_tone_zone
*/ */
...@@ -209,43 +198,43 @@ extern struct ast_tone_zone_sound __fake_tone_zone_sound; ...@@ -209,43 +198,43 @@ extern struct ast_tone_zone_sound __fake_tone_zone_sound;
* *
* \return NULL * \return NULL
*/ */
#define ast_tone_zone_unref(tz) ({ \ static inline struct ast_tone_zone *ast_tone_zone_unref(struct ast_tone_zone *tz)
AST_CHECK_TONE_ZONE(tz); \ {
ao2_ref(tz, -1); \ ao2_ref(tz, -1);
(NULL); \ return NULL;
}) }
/*! /*!
* \brief Increase the reference count on an ast_tone_zone * \brief Increase the reference count on an ast_tone_zone
* *
* \return The tone zone provided as an argument * \return The tone zone provided as an argument
*/ */
#define ast_tone_zone_ref(tz) ({ \ static inline struct ast_tone_zone *ast_tone_zone_ref(struct ast_tone_zone *tz)
AST_CHECK_TONE_ZONE(tz); \ {
ao2_ref(tz, +1); \ ao2_ref(tz, +1);
(tz); \ return tz;
}) }
/*! /*!
* \brief Release a reference to an ast_tone_zone_sound * \brief Release a reference to an ast_tone_zone_sound
* *
* \return NULL * \return NULL
*/ */
#define ast_tone_zone_sound_unref(ts) ({ \ static inline struct ast_tone_zone_sound *ast_tone_zone_sound_unref(struct ast_tone_zone_sound *ts)
AST_CHECK_TONE_ZONE_SOUND(ts); \ {
ao2_ref(ts, -1); \ ao2_ref(ts, -1);
(NULL); \ return NULL;
}) }
/*! /*!
* \brief Increase the reference count on an ast_tone_zone_sound * \brief Increase the reference count on an ast_tone_zone_sound
* *
* \return The tone zone sound provided as an argument * \return The tone zone sound provided as an argument
*/ */
#define ast_tone_zone_sound_ref(ts) ({ \ static inline struct ast_tone_zone_sound *ast_tone_zone_sound_ref(struct ast_tone_zone_sound *ts)
AST_CHECK_TONE_ZONE_SOUND(ts); \ {
ao2_ref(ts, +1); \ ao2_ref(ts, +1);
(ts); \ return ts;
}) }
#endif /* _ASTERISK_INDICATIONS_H */ #endif /* _ASTERISK_INDICATIONS_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment