]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/journal/audit-type.h
Merge pull request #11827 from keszybz/pkgconfig-variables
[thirdparty/systemd.git] / src / journal / audit-type.h
index 069a883490d69b0b071d3327996bd2caa1a82db9..98e5c39420e6360e812fa5f24c6d618f95b8b34a 100644 (file)
@@ -4,6 +4,7 @@
 #include <alloca.h>
 #include <stdio.h>
 
+#include "alloc-util.h"
 #include "macro.h"
 
 const char *audit_type_to_string(int type);
@@ -15,7 +16,7 @@ int audit_type_from_string(const char *s);
                 const char *_s_;                                        \
                 _s_ = audit_type_to_string(type);                       \
                 if (!_s_) {                                             \
-                        _s_ = alloca(STRLEN("AUDIT") + DECIMAL_STR_MAX(int)); \
+                        _s_ = newa(char, STRLEN("AUDIT") + DECIMAL_STR_MAX(int)); \
                         sprintf((char*) _s_, "AUDIT%04i", type);        \
                 }                                                       \
                 _s_;                                                    \