summaryrefslogtreecommitdiff
path: root/sys-apps/systemd/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
commit623ee73d661e5ed8475cb264511f683407d87365 (patch)
tree993eb27c93ec7a2d2d19550300d888fc1fed9e69 /sys-apps/systemd/files
parentceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff)
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'sys-apps/systemd/files')
-rw-r--r--sys-apps/systemd/files/245-clang-gnu11.patch60
-rw-r--r--sys-apps/systemd/files/245-rc1-network-debug.patch45
-rw-r--r--sys-apps/systemd/files/245-rc1-sysctl-segfault.patch23
3 files changed, 60 insertions, 68 deletions
diff --git a/sys-apps/systemd/files/245-clang-gnu11.patch b/sys-apps/systemd/files/245-clang-gnu11.patch
new file mode 100644
index 000000000000..9056b56d48ee
--- /dev/null
+++ b/sys-apps/systemd/files/245-clang-gnu11.patch
@@ -0,0 +1,60 @@
+From 36e0d89a88c51ba879a2d7e2f90ea9b38333e2c0 Mon Sep 17 00:00:00 2001
+From: Denis Pronin <dannftk@yandex.ru>
+Date: Sun, 8 Mar 2020 23:57:07 +0300
+Subject: [PATCH] Support compiling with clang and gnu11 standard
+
+Signed-off-by: Denis Pronin <dannftk@yandex.ru>
+---
+ src/shared/json-internal.h | 35 ++++++++++++++++++++++++-----------
+ 1 file changed, 24 insertions(+), 11 deletions(-)
+
+diff --git a/src/shared/json-internal.h b/src/shared/json-internal.h
+index bf158bff0d4..fabff0c860e 100644
+--- a/src/shared/json-internal.h
++++ b/src/shared/json-internal.h
+@@ -26,21 +26,34 @@ assert_cc(sizeof(JsonValue) == 16U);
+ /* We use fake JsonVariant objects for some special values, in order to avoid memory allocations for them. Note that
+ * effectively this means that there are multiple ways to encode the same objects: via these magic values or as
+ * properly allocated JsonVariant. We convert between both on-the-fly as necessary. */
+-#define JSON_VARIANT_MAGIC_TRUE ((JsonVariant*) 1)
+-#define JSON_VARIANT_MAGIC_FALSE ((JsonVariant*) 2)
+-#define JSON_VARIANT_MAGIC_NULL ((JsonVariant*) 3)
+-#define JSON_VARIANT_MAGIC_ZERO_INTEGER ((JsonVariant*) 4)
+-#define JSON_VARIANT_MAGIC_ZERO_UNSIGNED ((JsonVariant*) 5)
+-#define JSON_VARIANT_MAGIC_ZERO_REAL ((JsonVariant*) 6)
+-#define JSON_VARIANT_MAGIC_EMPTY_STRING ((JsonVariant*) 7)
+-#define JSON_VARIANT_MAGIC_EMPTY_ARRAY ((JsonVariant*) 8)
+-#define JSON_VARIANT_MAGIC_EMPTY_OBJECT ((JsonVariant*) 9)
+-#define _JSON_VARIANT_MAGIC_MAX ((JsonVariant*) 10)
++enum
++{
++ _JSON_VARIANT_MAGIC_TRUE = 1,
++#define JSON_VARIANT_MAGIC_TRUE ((JsonVariant*) _JSON_VARIANT_MAGIC_TRUE)
++ _JSON_VARIANT_MAGIC_FALSE,
++#define JSON_VARIANT_MAGIC_FALSE ((JsonVariant*) _JSON_VARIANT_MAGIC_FALSE)
++ _JSON_VARIANT_MAGIC_NULL,
++#define JSON_VARIANT_MAGIC_NULL ((JsonVariant*) _JSON_VARIANT_MAGIC_NULL)
++ _JSON_VARIANT_MAGIC_ZERO_INTEGER,
++#define JSON_VARIANT_MAGIC_ZERO_INTEGER ((JsonVariant*) _JSON_VARIANT_MAGIC_ZERO_INTEGER)
++ _JSON_VARIANT_MAGIC_ZERO_UNSIGNED,
++#define JSON_VARIANT_MAGIC_ZERO_UNSIGNED ((JsonVariant*) _JSON_VARIANT_MAGIC_ZERO_UNSIGNED)
++ _JSON_VARIANT_MAGIC_ZERO_REAL,
++#define JSON_VARIANT_MAGIC_ZERO_REAL ((JsonVariant*) _JSON_VARIANT_MAGIC_ZERO_REAL)
++ _JSON_VARIANT_MAGIC_EMPTY_STRING,
++#define JSON_VARIANT_MAGIC_EMPTY_STRING ((JsonVariant*) _JSON_VARIANT_MAGIC_EMPTY_STRING)
++ _JSON_VARIANT_MAGIC_EMPTY_ARRAY,
++#define JSON_VARIANT_MAGIC_EMPTY_ARRAY ((JsonVariant*) _JSON_VARIANT_MAGIC_EMPTY_ARRAY)
++ _JSON_VARIANT_MAGIC_EMPTY_OBJECT,
++#define JSON_VARIANT_MAGIC_EMPTY_OBJECT ((JsonVariant*) _JSON_VARIANT_MAGIC_EMPTY_OBJECT)
++ __JSON_VARIANT_MAGIC_MAX
++#define _JSON_VARIANT_MAGIC_MAX ((JsonVariant*) __JSON_VARIANT_MAGIC_MAX)
++};
+
+ /* This is only safe as long as we don't define more than 4K magic pointers, i.e. the page size of the simplest
+ * architectures we support. That's because we rely on the fact that malloc() will never allocate from the first memory
+ * page, as it is a faulting page for catching NULL pointer dereferences. */
+-assert_cc((uintptr_t) _JSON_VARIANT_MAGIC_MAX < 4096U);
++assert_cc((unsigned) __JSON_VARIANT_MAGIC_MAX < 4096U);
+
+ enum { /* JSON tokens */
+ JSON_TOKEN_END,
diff --git a/sys-apps/systemd/files/245-rc1-network-debug.patch b/sys-apps/systemd/files/245-rc1-network-debug.patch
deleted file mode 100644
index e65035f21857..000000000000
--- a/sys-apps/systemd/files/245-rc1-network-debug.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 01ec0028d97fa97d2e433659e24a1517b0e2382e Mon Sep 17 00:00:00 2001
-From: Mike Gilbert <floppym@gentoo.org>
-Date: Wed, 5 Feb 2020 11:04:50 -0500
-Subject: [PATCH] network: remove unnecessary link->ifname from debug log
- statements
-
-Since 98b0299479a68ffd414888368907fc776a46b82a, we log the interface
-name automatically via log_link_debug().
-
-Fixes: https://github.com/systemd/systemd/issues/14782
----
- src/network/networkd-dhcp-server.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/network/networkd-dhcp-server.c b/src/network/networkd-dhcp-server.c
-index a6dbe2e596c..bee75a6930e 100644
---- a/src/network/networkd-dhcp-server.c
-+++ b/src/network/networkd-dhcp-server.c
-@@ -45,7 +45,7 @@ static int link_push_uplink_dns_to_dhcp_server(Link *link, sd_dhcp_server *s) {
- size_t n_addresses = 0, n_allocated = 0;
- unsigned i;
-
-- log_link_debug(link, "Copying DNS server information from %s", link->ifname);
-+ log_link_debug(link, "Copying DNS server information from link");
-
- if (!link->network)
- return 0;
-@@ -99,7 +99,7 @@ static int link_push_uplink_ntp_to_dhcp_server(Link *link, sd_dhcp_server *s) {
- if (!link->network)
- return 0;
-
-- log_link_debug(link, "Copying NTP server information from %s", link->ifname);
-+ log_link_debug(link, "Copying NTP server information from link");
-
- STRV_FOREACH(a, link->network->ntp) {
- union in_addr_union ia;
-@@ -148,7 +148,7 @@ static int link_push_uplink_sip_to_dhcp_server(Link *link, sd_dhcp_server *s) {
- if (!link->network)
- return 0;
-
-- log_link_debug(link, "Copying SIP server information from %s", link->ifname);
-+ log_link_debug(link, "Copying SIP server information from link");
-
- STRV_FOREACH(a, link->network->sip) {
- union in_addr_union ia;
diff --git a/sys-apps/systemd/files/245-rc1-sysctl-segfault.patch b/sys-apps/systemd/files/245-rc1-sysctl-segfault.patch
deleted file mode 100644
index 7618b2deba5e..000000000000
--- a/sys-apps/systemd/files/245-rc1-sysctl-segfault.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From db99904bc8482efe556bb010a8b203a3e60ee37f Mon Sep 17 00:00:00 2001
-From: Yu Watanabe <watanabe.yu+github@gmail.com>
-Date: Thu, 6 Feb 2020 19:13:11 +0900
-Subject: [PATCH] sysctl: fix segfault
-
-Fixes #14801.
----
- src/sysctl/sysctl.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c
-index bbcf0c43235..0cdb740d218 100644
---- a/src/sysctl/sysctl.c
-+++ b/src/sysctl/sysctl.c
-@@ -257,7 +257,7 @@ static int parse_file(OrderedHashmap **sysctl_options, const char *path, bool ig
-
- existing = ordered_hashmap_get(*sysctl_options, p);
- if (existing) {
-- if (streq(value, existing->value)) {
-+ if (streq_ptr(value, existing->value)) {
- existing->ignore_failure = existing->ignore_failure || ignore_failure;
- continue;
- }