summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch326
1 files changed, 307 insertions, 19 deletions
diff --git a/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch b/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
index f20897b5f8..a2e25a97df 100644
--- a/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
+++ b/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch
@@ -9,21 +9,45 @@ Upstream-Status: Inappropriate [musl specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+[Rebased for v242]
+Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
---
- meson.build | 1 +
- src/basic/missing_stdlib.h | 12 ++++++++++++
- src/basic/mkdir.c | 1 +
- src/basic/parse-util.c | 1 +
- src/basic/procfs-util.c | 1 +
- src/shared/pager.c | 1 +
- src/shared/uid-range.c | 1 +
- 7 files changed, 18 insertions(+)
+ meson.build | 1 +
+ src/backlight/backlight.c | 1 +
+ src/basic/env-util.c | 1 +
+ src/basic/missing_stdlib.h | 12 ++++++++++++
+ src/basic/mkdir.c | 1 +
+ src/basic/parse-util.c | 1 +
+ src/basic/proc-cmdline.c | 1 +
+ src/basic/procfs-util.c | 1 +
+ src/basic/time-util.c | 1 +
+ src/core/dbus-cgroup.c | 1 +
+ src/core/dbus-util.c | 1 +
+ src/core/kmod-setup.c | 1 +
+ src/core/service.c | 1 +
+ src/journal/journalctl.c | 1 +
+ src/libsystemd/sd-bus/bus-message.c | 1 +
+ src/libsystemd/sd-bus/bus-objects.c | 1 +
+ src/libsystemd/sd-bus/test-bus-benchmark.c | 1 +
+ src/locale/keymap-util.c | 1 +
+ src/nspawn/nspawn-settings.c | 1 +
+ src/shared/dns-domain.c | 1 +
+ src/shared/journal-importer.c | 1 +
+ src/shared/logs-show.c | 1 +
+ src/shared/pager.c | 1 +
+ src/shared/path-lookup.c | 1 +
+ src/shared/uid-range.c | 1 +
+ src/socket-proxy/socket-proxyd.c | 1 +
+ src/test/test-hexdecoct.c | 1 +
+ src/udev/udev-builtin-path_id.c | 1 +
+ src/udev/udev-rules.c | 1 +
+ 29 files changed, 40 insertions(+)
diff --git a/meson.build b/meson.build
-index 44b24ee..70fb218 100644
+index 79195c9..80d9564 100644
--- a/meson.build
+++ b/meson.build
-@@ -558,6 +558,7 @@ foreach ident : [
+@@ -572,6 +572,7 @@ foreach ident : [
#include <unistd.h>'''],
['explicit_bzero' , '''#include <string.h>'''],
['reallocarray', '''#include <malloc.h>'''],
@@ -31,8 +55,32 @@ index 44b24ee..70fb218 100644
]
have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
+diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c
+index dfd6805..c2b2ace 100644
+--- a/src/backlight/backlight.c
++++ b/src/backlight/backlight.c
+@@ -17,6 +17,7 @@
+ #include "string-util.h"
+ #include "strv.h"
+ #include "util.h"
++#include "missing.h"
+
+ static int find_pci_or_platform_parent(sd_device *device, sd_device **ret) {
+ const char *subsystem, *sysname, *value;
+diff --git a/src/basic/env-util.c b/src/basic/env-util.c
+index fd449dc..e2b0722 100644
+--- a/src/basic/env-util.c
++++ b/src/basic/env-util.c
+@@ -16,6 +16,7 @@
+ #include "string-util.h"
+ #include "strv.h"
+ #include "utf8.h"
++#include "missing.h"
+
+ #define VALID_CHARS_ENV_NAME \
+ DIGITS LETTERS \
diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h
-index c0ffe86..d50274b 100644
+index 188a8d4..1e16ec2 100644
--- a/src/basic/missing_stdlib.h
+++ b/src/basic/missing_stdlib.h
@@ -11,3 +11,15 @@
@@ -52,10 +100,10 @@ index c0ffe86..d50274b 100644
+ })
+#endif
diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
-index 4bb65d5..3038ab9 100644
+index 6b82eab..51c6b78 100644
--- a/src/basic/mkdir.c
+++ b/src/basic/mkdir.c
-@@ -13,6 +13,7 @@
+@@ -14,6 +14,7 @@
#include "stat-util.h"
#include "stdio-util.h"
#include "user-util.h"
@@ -75,6 +123,18 @@ index 87724af..d9c53bc 100644
int parse_boolean(const char *v) {
if (!v)
+diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c
+index 1670001..b51feaa 100644
+--- a/src/basic/proc-cmdline.c
++++ b/src/basic/proc-cmdline.c
+@@ -15,6 +15,7 @@
+ #include "string-util.h"
+ #include "util.h"
+ #include "virt.h"
++#include "missing.h"
+
+ int proc_cmdline(char **ret) {
+ const char *e;
diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c
index 7aaf95b..42ce53d 100644
--- a/src/basic/procfs-util.c
@@ -87,30 +147,258 @@ index 7aaf95b..42ce53d 100644
int procfs_tasks_get_limit(uint64_t *ret) {
_cleanup_free_ char *value = NULL;
+diff --git a/src/basic/time-util.c b/src/basic/time-util.c
+index daf952b..374b97f 100644
+--- a/src/basic/time-util.c
++++ b/src/basic/time-util.c
+@@ -28,6 +28,7 @@
+ #include "string-util.h"
+ #include "strv.h"
+ #include "time-util.h"
++#include "missing.h"
+
+ static clockid_t map_clock_id(clockid_t c) {
+
+diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c
+index 4615aea..bc1364f 100644
+--- a/src/core/dbus-cgroup.c
++++ b/src/core/dbus-cgroup.c
+@@ -15,6 +15,7 @@
+ #include "fileio.h"
+ #include "limits-util.h"
+ #include "path-util.h"
++#include "missing.h"
+
+ static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_cgroup_device_policy, cgroup_device_policy, CGroupDevicePolicy);
+
+diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c
+index f4fbb72..0a1e3b5 100644
+--- a/src/core/dbus-util.c
++++ b/src/core/dbus-util.c
+@@ -7,6 +7,7 @@
+ #include "unit-printf.h"
+ #include "user-util.h"
+ #include "unit.h"
++#include "missing.h"
+
+ int bus_property_get_triggered_unit(
+ sd_bus *bus,
+diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
+index a91cfeb..a459610 100644
+--- a/src/core/kmod-setup.c
++++ b/src/core/kmod-setup.c
+@@ -11,6 +11,7 @@
+ #include "kmod-setup.h"
+ #include "macro.h"
+ #include "string-util.h"
++#include "missing.h"
+
+ #if HAVE_KMOD
+ #include <libkmod.h>
+diff --git a/src/core/service.c b/src/core/service.c
+index 0289990..0e725b5 100644
+--- a/src/core/service.c
++++ b/src/core/service.c
+@@ -42,6 +42,7 @@
+ #include "unit.h"
+ #include "utf8.h"
+ #include "util.h"
++#include "missing.h"
+
+ static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
+ [SERVICE_DEAD] = UNIT_INACTIVE,
+diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
+index 0048909..0e85eb7 100644
+--- a/src/journal/journalctl.c
++++ b/src/journal/journalctl.c
+@@ -67,6 +67,7 @@
+ #include "tmpfile-util.h"
+ #include "unit-name.h"
+ #include "user-util.h"
++#include "missing.h"
+
+ #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE)
+
+diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
+index 427d42f..b050568 100644
+--- a/src/libsystemd/sd-bus/bus-message.c
++++ b/src/libsystemd/sd-bus/bus-message.c
+@@ -21,6 +21,7 @@
+ #include "strv.h"
+ #include "time-util.h"
+ #include "utf8.h"
++#include "missing.h"
+
+ static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored);
+
+diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c
+index d9fc256..e9c6932 100644
+--- a/src/libsystemd/sd-bus/bus-objects.c
++++ b/src/libsystemd/sd-bus/bus-objects.c
+@@ -13,6 +13,7 @@
+ #include "set.h"
+ #include "string-util.h"
+ #include "strv.h"
++#include "missing.h"
+
+ static int node_vtable_get_userdata(
+ sd_bus *bus,
+diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c
+index 8de0a85..4fd0a2e 100644
+--- a/src/libsystemd/sd-bus/test-bus-benchmark.c
++++ b/src/libsystemd/sd-bus/test-bus-benchmark.c
+@@ -14,6 +14,7 @@
+ #include "missing_resource.h"
+ #include "time-util.h"
+ #include "util.h"
++#include "missing.h"
+
+ #define MAX_SIZE (2*1024*1024)
+
+diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c
+index b8bd181..fe0cae0 100644
+--- a/src/locale/keymap-util.c
++++ b/src/locale/keymap-util.c
+@@ -23,6 +23,7 @@
+ #include "string-util.h"
+ #include "strv.h"
+ #include "tmpfile-util.h"
++#include "missing.h"
+
+ static bool startswith_comma(const char *s, const char *prefix) {
+ s = startswith(s, prefix);
+diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c
+index 476cb07..91e28de 100644
+--- a/src/nspawn/nspawn-settings.c
++++ b/src/nspawn/nspawn-settings.c
+@@ -16,6 +16,7 @@
+ #include "strv.h"
+ #include "user-util.h"
+ #include "util.h"
++#include "missing.h"
+
+ Settings *settings_new(void) {
+ Settings *s;
+diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c
+index 4b31cb3..989ebf3 100644
+--- a/src/shared/dns-domain.c
++++ b/src/shared/dns-domain.c
+@@ -24,6 +24,7 @@
+ #include "string-util.h"
+ #include "strv.h"
+ #include "utf8.h"
++#include "missing.h"
+
+ int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) {
+ const char *n;
+diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c
+index 8638cd3..d03774a 100644
+--- a/src/shared/journal-importer.c
++++ b/src/shared/journal-importer.c
+@@ -13,6 +13,7 @@
+ #include "parse-util.h"
+ #include "string-util.h"
+ #include "unaligned.h"
++#include "missing.h"
+
+ enum {
+ IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */
+diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
+index 5fb736f..19cb165 100644
+--- a/src/shared/logs-show.c
++++ b/src/shared/logs-show.c
+@@ -38,6 +38,7 @@
+ #include "time-util.h"
+ #include "utf8.h"
+ #include "util.h"
++#include "missing.h"
+
+ /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */
+ #define PRINT_LINE_THRESHOLD 3
diff --git a/src/shared/pager.c b/src/shared/pager.c
-index bf2597e..fa9e321 100644
+index 2abb0f6..a00c95f 100644
--- a/src/shared/pager.c
+++ b/src/shared/pager.c
-@@ -24,6 +24,7 @@
- #include "string-util.h"
+@@ -25,6 +25,7 @@
#include "strv.h"
#include "terminal-util.h"
+ #include "util.h"
+#include "missing.h"
static pid_t pager_pid = 0;
+diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c
+index 442fde7..0eb1188 100644
+--- a/src/shared/path-lookup.c
++++ b/src/shared/path-lookup.c
+@@ -20,6 +20,7 @@
+ #include "tmpfile-util.h"
+ #include "user-util.h"
+ #include "util.h"
++#include "missing.h"
+
+ int xdg_user_runtime_dir(char **ret, const char *suffix) {
+ const char *e;
diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c
-index 5fa7bd2..9c63b9e 100644
+index 7cb7d8a..8b12b91 100644
--- a/src/shared/uid-range.c
+++ b/src/shared/uid-range.c
@@ -9,6 +9,7 @@
+ #include "sort-util.h"
#include "uid-range.h"
#include "user-util.h"
- #include "util.h"
+#include "missing.h"
static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) {
assert(range);
+diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c
+index abbbc9f..6179b58 100644
+--- a/src/socket-proxy/socket-proxyd.c
++++ b/src/socket-proxy/socket-proxyd.c
+@@ -28,6 +28,7 @@
+ #include "socket-util.h"
+ #include "string-util.h"
+ #include "util.h"
++#include "missing.h"
+
+ #define BUFFER_SIZE (256 * 1024)
+
+diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
+index 5221742..a05e778 100644
+--- a/src/test/test-hexdecoct.c
++++ b/src/test/test-hexdecoct.c
+@@ -6,6 +6,7 @@
+ #include "hexdecoct.h"
+ #include "macro.h"
+ #include "string-util.h"
++#include "missing.h"
+
+ static void test_hexchar(void) {
+ assert_se(hexchar(0xa) == 'a');
+diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c
+index 7ce1c56..cc19b8e 100644
+--- a/src/udev/udev-builtin-path_id.c
++++ b/src/udev/udev-builtin-path_id.c
+@@ -23,6 +23,7 @@
+ #include "strv.h"
+ #include "sysexits.h"
+ #include "udev-builtin.h"
++#include "missing.h"
+
+ _printf_(2,3)
+ static void path_prepend(char **path, const char *fmt, ...) {
+diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
+index ee87d7c..9aced10 100644
+--- a/src/udev/udev-rules.c
++++ b/src/udev/udev-rules.c
+@@ -40,6 +40,7 @@
+ #include "udev.h"
+ #include "user-util.h"
+ #include "util.h"
++#include "missing.h"
+
+ #define PREALLOC_TOKEN 2048
+ #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d")
--
-2.7.4
+2.11.0