diff options
Diffstat (limited to 'src/basic/string-util.h')
-rw-r--r-- | src/basic/string-util.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/basic/string-util.h b/src/basic/string-util.h index a5b5a16a5d..38070abb22 100644 --- a/src/basic/string-util.h +++ b/src/basic/string-util.h @@ -6,6 +6,7 @@ #include <stddef.h> #include <string.h> +#include "alloc-util.h" #include "macro.h" /* What is interpreted as whitespace? */ @@ -111,7 +112,7 @@ char *strjoin_real(const char *x, ...) _sentinel_; size_t _i_; \ for (_i_ = 0; _i_ < ELEMENTSOF(_appendees_) && _appendees_[_i_]; _i_++) \ _len_ += strlen(_appendees_[_i_]); \ - _p_ = _d_ = alloca(_len_ + 1); \ + _p_ = _d_ = newa(char, _len_ + 1); \ for (_i_ = 0; _i_ < ELEMENTSOF(_appendees_) && _appendees_[_i_]; _i_++) \ _p_ = stpcpy(_p_, _appendees_[_i_]); \ *_p_ = 0; \ |