]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/journal/journal-send.c
tree-wide: drop socket.h when socket-util.h is included
[thirdparty/systemd.git] / src / journal / journal-send.c
index 87056435fcdd9973237e1f8c230884b4a5057975..912ecef73cce0d13a5a8967e0752d1acc624fa15 100644 (file)
@@ -4,7 +4,6 @@
 #include <fcntl.h>
 #include <printf.h>
 #include <stddef.h>
-#include <sys/socket.h>
 #include <sys/un.h>
 #include <unistd.h>
 
@@ -13,6 +12,7 @@
 #include "sd-journal.h"
 
 #include "alloc-util.h"
+#include "errno-util.h"
 #include "fd-util.h"
 #include "io-util.h"
 #include "memfd-util.h"
@@ -20,7 +20,6 @@
 #include "stdio-util.h"
 #include "string-util.h"
 #include "tmpfile-util.h"
-#include "util.h"
 
 #define SNDBUF_SIZE (8*1024*1024)
 
@@ -30,7 +29,7 @@
                 const char *_func = (func);       \
                 char **_f = &(f);                 \
                 _fl = strlen(_func) + 1;          \
-                *_f = alloca(_fl + 10);           \
+                *_f = newa(char, _fl + 10);       \
                 memcpy(*_f, "CODE_FUNC=", 10);    \
                 memcpy(*_f + 10, _func, _fl);     \
         } while (false)
@@ -403,7 +402,7 @@ _public_ int sd_journal_stream_fd(const char *identifier, int priority, int leve
         identifier = strempty(identifier);
 
         l = strlen(identifier);
-        header = alloca(l + 1 + 1 + 2 + 2 + 2 + 2 + 2);
+        header = newa(char, l + 1 + 1 + 2 + 2 + 2 + 2 + 2);
 
         memcpy(header, identifier, l);
         header[l++] = '\n';