diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/autoconfig.h.in | 3 | ||||
-rw-r--r-- | include/asterisk/compiler.h | 6 | ||||
-rw-r--r-- | include/asterisk/file.h | 8 |
3 files changed, 16 insertions, 1 deletions
diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in index 92ac3f7ce..d5a6faa1b 100644 --- a/include/asterisk/autoconfig.h.in +++ b/include/asterisk/autoconfig.h.in @@ -47,6 +47,9 @@ /* Define to 1 if your GCC C compiler supports the 'const' attribute. */ #undef HAVE_ATTRIBUTE_const +/* Define to 1 if your GCC C compiler supports the 'deprecated' attribute. */ +#undef HAVE_ATTRIBUTE_deprecated + /* Define to 1 if your GCC C compiler supports the 'malloc' attribute. */ #undef HAVE_ATTRIBUTE_malloc diff --git a/include/asterisk/compiler.h b/include/asterisk/compiler.h index 8ac441463..0955b8c8f 100644 --- a/include/asterisk/compiler.h +++ b/include/asterisk/compiler.h @@ -53,4 +53,10 @@ #define attribute_malloc #endif +#if HAVE_ATTRIBUTE_deprecated +#define attribute_deprecated __attribute__((deprecated)) +#else +#define attribute_deprecated +#endif + #endif /* _ASTERISK_COMPILER_H */ diff --git a/include/asterisk/file.h b/include/asterisk/file.h index fc1aa2157..636309bc4 100644 --- a/include/asterisk/file.h +++ b/include/asterisk/file.h @@ -132,7 +132,13 @@ struct ast_filestream { FILE *f; struct ast_frame fr; /* frame produced by read, typically */ char *buf; /* buffer pointed to by ast_frame; */ - void *_private; /* pointer to private buffer */ + /* pointer to private buffer */ + union { + void *_private; +#if !defined(__cplusplus) && !defined(c_plusplus) + void *private attribute_deprecated; +#endif + }; const char *orig_chan_name; }; |