diff options
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch')
-rw-r--r-- | meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch b/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch index dc40a2fe8d..d93f630752 100644 --- a/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch +++ b/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch @@ -1,7 +1,7 @@ -From 6c18e5f9373da3e3b38f2c5727e2aefe07fcbbd9 Mon Sep 17 00:00:00 2001 +From 3e0df2c22bfd37bc62bf09a01ec498e40d3599de Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Sat, 22 May 2021 20:26:24 +0200 -Subject: [PATCH] [PATCH] add fallback parse_printf_format implementation +Subject: [PATCH] add fallback parse_printf_format implementation Upstream-Status: Inappropriate [musl specific] @@ -10,6 +10,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Chen Qi <Qi.Chen@windriver.com> [rebased for systemd 243] Signed-off-by: Scott Murray <scott.murray@konsulko.com> + --- meson.build | 1 + src/basic/meson.build | 5 + @@ -21,11 +22,9 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> create mode 100644 src/basic/parse-printf-format.c create mode 100644 src/basic/parse-printf-format.h -diff --git a/meson.build b/meson.build -index 27186d63a3..2abb7b3188 100644 --- a/meson.build +++ b/meson.build -@@ -675,6 +675,7 @@ endif +@@ -686,6 +686,7 @@ endif foreach header : ['crypt.h', 'linux/memfd.h', 'linux/vm_sockets.h', @@ -33,11 +32,9 @@ index 27186d63a3..2abb7b3188 100644 'sys/auxv.h', 'valgrind/memcheck.h', 'valgrind/valgrind.h', -diff --git a/src/basic/meson.build b/src/basic/meson.build -index 60ef801a25..aba2172edd 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build -@@ -341,6 +341,11 @@ endforeach +@@ -335,6 +335,11 @@ endforeach basic_sources += generated_gperf_headers @@ -49,9 +46,6 @@ index 60ef801a25..aba2172edd 100644 ############################################################ arch_list = [ -diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c -new file mode 100644 -index 0000000000..49437e5445 --- /dev/null +++ b/src/basic/parse-printf-format.c @@ -0,0 +1,273 @@ @@ -328,9 +322,6 @@ index 0000000000..49437e5445 + + return last; +} -diff --git a/src/basic/parse-printf-format.h b/src/basic/parse-printf-format.h -new file mode 100644 -index 0000000000..47be7522d7 --- /dev/null +++ b/src/basic/parse-printf-format.h @@ -0,0 +1,57 @@ @@ -391,8 +382,6 @@ index 0000000000..47be7522d7 +size_t parse_printf_format(const char *fmt, size_t n, int *types); + +#endif /* HAVE_PRINTF_H */ -diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h -index 6dc1e72312..cea76b36cf 100644 --- a/src/basic/stdio-util.h +++ b/src/basic/stdio-util.h @@ -1,13 +1,13 @@ @@ -408,10 +397,8 @@ index 6dc1e72312..cea76b36cf 100644 #include "memory-util.h" +#include "parse-printf-format.h" - #define snprintf_ok(buf, len, fmt, ...) \ - ((size_t) snprintf(buf, len, fmt, __VA_ARGS__) < (len)) -diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c -index fd3fd7ef9c..e8e6ad555b 100644 + #define snprintf_ok(buf, len, fmt, ...) \ + ({ \ --- a/src/libsystemd/sd-journal/journal-send.c +++ b/src/libsystemd/sd-journal/journal-send.c @@ -2,7 +2,6 @@ @@ -430,6 +417,3 @@ index fd3fd7ef9c..e8e6ad555b 100644 #define SNDBUF_SIZE (8*1024*1024) --- -2.24.0 - |