diff options
author | David M. Lee <dlee@respoke.io> | 2016-07-27 09:56:29 -0500 |
---|---|---|
committer | George Joseph <gjoseph@digium.com> | 2016-08-01 10:53:19 -0600 |
commit | df42f64d62cf6c158a391db4ff1b4c57b87dbf10 (patch) | |
tree | e6046ba90d6fd8d3d6b3ee415c946d16f0721505 /menuselect/menuselect.c | |
parent | 56a07fbab9bdabc562d88706067ce53f7025a660 (diff) |
Replace strdupa with more portable ast_strdupa
The strdupa function is a GNU extension, and not widely portable. We
have an ast_strdupa function used within Asterisk which is preferred.
I pulled the definition up from menuselect.c into the menuselect.h
header file so it can be shared across menuselect.
Change-Id: I9593c97f78386b47dc1e83201e80cb2f62b36c2e
Diffstat (limited to 'menuselect/menuselect.c')
-rw-r--r-- | menuselect/menuselect.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/menuselect/menuselect.c b/menuselect/menuselect.c index efae311bb..f6a7fb39b 100644 --- a/menuselect/menuselect.c +++ b/menuselect/menuselect.c @@ -103,18 +103,6 @@ struct dep_file { }; AST_LIST_HEAD_NOLOCK_STATIC(deps_file, dep_file); -#if !defined(ast_strdupa) && defined(__GNUC__) -#define ast_strdupa(s) \ - (__extension__ \ - ({ \ - const char *__old = (s); \ - size_t __len = strlen(__old) + 1; \ - char *__new = __builtin_alloca(__len); \ - memcpy (__new, __old, __len); \ - __new; \ - })) -#endif - /*! \brief return a pointer to the first non-whitespace character */ static inline char *skip_blanks(char *str) { |