summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch
diff options
context:
space:
mode:
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.patch53
1 files changed, 27 insertions, 26 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 a2aad40ac2..1d61367da4 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 7bcf3b166694090497a0acd2c5299e4e04fcc9b6 Mon Sep 17 00:00:00 2001
-From: Chen Qi <Qi.Chen@windriver.com>
-Date: Mon, 25 Feb 2019 14:04:21 +0800
-Subject: [PATCH 04/24] add fallback parse_printf_format implementation
+From b19f800e178516d4f4d344457647e4a018bd6855 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] add fallback parse_printf_format implementation
Upstream-Status: Inappropriate [musl specific]
@@ -10,22 +10,23 @@ 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 +
- src/basic/parse-printf-format.c | 273 ++++++++++++++++++++++++++++++++++++++++
- src/basic/parse-printf-format.h | 57 +++++++++
- src/basic/stdio-util.h | 2 +-
- src/journal/journal-send.c | 2 +-
+ meson.build | 1 +
+ src/basic/meson.build | 5 +
+ src/basic/parse-printf-format.c | 273 +++++++++++++++++++++++
+ src/basic/parse-printf-format.h | 57 +++++
+ src/basic/stdio-util.h | 2 +-
+ src/libsystemd/sd-journal/journal-send.c | 2 +-
6 files changed, 338 insertions(+), 2 deletions(-)
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 79b762faeb..7f8c679411 100644
+index 738879eb21..1aa20b8246 100644
--- a/meson.build
+++ b/meson.build
-@@ -613,6 +613,7 @@ endif
+@@ -656,6 +656,7 @@ endif
foreach header : ['crypt.h',
'linux/memfd.h',
'linux/vm_sockets.h',
@@ -34,21 +35,21 @@ index 79b762faeb..7f8c679411 100644
'valgrind/memcheck.h',
'valgrind/valgrind.h',
diff --git a/src/basic/meson.build b/src/basic/meson.build
-index d6caf28f14..32c1acf349 100644
+index 9b016ce5e8..a9ce21b02e 100644
--- a/src/basic/meson.build
+++ b/src/basic/meson.build
-@@ -312,6 +312,11 @@ foreach item : [['af', af_list_txt, 'af', ''],
- endforeach
+@@ -322,6 +322,11 @@ endforeach
basic_sources += generated_gperf_headers
-+
+
+if conf.get('HAVE_PRINTF_H') != 1
+ basic_sources += [files('parse-printf-format.c')]
+endif
+
- basic_gcrypt_sources = files(
- 'gcrypt-util.c',
- 'gcrypt-util.h')
++
+ ############################################################
+
+ 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
@@ -392,11 +393,11 @@ index 0000000000..47be7522d7
+
+#endif /* HAVE_PRINTF_H */
diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h
-index c3b9448d4f..2937aa13b1 100644
+index 6dc1e72312..cea76b36cf 100644
--- a/src/basic/stdio-util.h
+++ b/src/basic/stdio-util.h
@@ -1,13 +1,13 @@
- /* SPDX-License-Identifier: LGPL-2.1+ */
+ /* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include <printf.h>
@@ -410,18 +411,18 @@ index c3b9448d4f..2937aa13b1 100644
#define snprintf_ok(buf, len, fmt, ...) \
((size_t) snprintf(buf, len, fmt, __VA_ARGS__) < (len))
-diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c
-index 5ef11fa1a4..6384ab620c 100644
---- a/src/journal/journal-send.c
-+++ b/src/journal/journal-send.c
+diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c
+index fd3fd7ef9c..e8e6ad555b 100644
+--- a/src/libsystemd/sd-journal/journal-send.c
++++ b/src/libsystemd/sd-journal/journal-send.c
@@ -2,7 +2,6 @@
#include <errno.h>
#include <fcntl.h>
-#include <printf.h>
#include <stddef.h>
- #include <sys/socket.h>
#include <sys/un.h>
+ #include <unistd.h>
@@ -21,6 +20,7 @@
#include "stdio-util.h"
#include "string-util.h"