1 |
commit: b2c1cefa829dd2cfd7fbc88c323e96a8749f2188 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 8 17:28:45 2019 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 8 17:29:04 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2c1cefa |
7 |
|
8 |
sys-apps/systemd: fix build with GCC 9 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/685090 |
11 |
Package-Manager: Portage-2.3.66_p2, Repoman-2.3.12_p111 |
12 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
13 |
|
14 |
sys-apps/systemd/files/242-gcc-9.patch | 35 ++++++++++++++++++++++++++++++++++ |
15 |
sys-apps/systemd/systemd-241-r1.ebuild | 1 + |
16 |
sys-apps/systemd/systemd-242.ebuild | 1 + |
17 |
3 files changed, 37 insertions(+) |
18 |
|
19 |
diff --git a/sys-apps/systemd/files/242-gcc-9.patch b/sys-apps/systemd/files/242-gcc-9.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..e12d6571823 |
22 |
--- /dev/null |
23 |
+++ b/sys-apps/systemd/files/242-gcc-9.patch |
24 |
@@ -0,0 +1,35 @@ |
25 |
+From c98b3545008d8e984ab456dcf79787418fcbfe13 Mon Sep 17 00:00:00 2001 |
26 |
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@××××××.pl> |
27 |
+Date: Tue, 7 May 2019 13:46:55 +0200 |
28 |
+Subject: [PATCH] network: remove redunant link name in message |
29 |
+ |
30 |
+Fixes #12454. |
31 |
+ |
32 |
+gcc was complaining that the link->ifname argument is NULL. Adding |
33 |
+assert(link->ifname) right before the call has no effect. It seems that |
34 |
+gcc is confused by the fact that log_link_warning_errno() internally |
35 |
+calls log_object(), with link->ifname passed as the object. log_object() |
36 |
+is also a macro and is does a check whether the passed object is NULL. |
37 |
+So we have a check if something is NULL right next an unconditional use |
38 |
+of it where it cannot be NULL. I think it's a bug in gcc. |
39 |
+ |
40 |
+Anyway, we don't need to use link->ifname here. log_object() already prepends |
41 |
+the object name to the message. |
42 |
+--- |
43 |
+ src/network/networkd-link.c | 3 +-- |
44 |
+ 1 file changed, 1 insertion(+), 2 deletions(-) |
45 |
+ |
46 |
+diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c |
47 |
+index 533193ac932..6fc82940033 100644 |
48 |
+--- a/src/network/networkd-link.c |
49 |
++++ b/src/network/networkd-link.c |
50 |
+@@ -338,8 +338,7 @@ static int link_enable_ipv6(Link *link) { |
51 |
+ |
52 |
+ r = sysctl_write_ip_property_boolean(AF_INET6, link->ifname, "disable_ipv6", disabled); |
53 |
+ if (r < 0) |
54 |
+- log_link_warning_errno(link, r, "Cannot %s IPv6 for interface %s: %m", |
55 |
+- enable_disable(!disabled), link->ifname); |
56 |
++ log_link_warning_errno(link, r, "Cannot %s IPv6: %m", enable_disable(!disabled)); |
57 |
+ else |
58 |
+ log_link_info(link, "IPv6 successfully %sd", enable_disable(!disabled)); |
59 |
+ |
60 |
|
61 |
diff --git a/sys-apps/systemd/systemd-241-r1.ebuild b/sys-apps/systemd/systemd-241-r1.ebuild |
62 |
index e136800d069..d1c0ba26976 100644 |
63 |
--- a/sys-apps/systemd/systemd-241-r1.ebuild |
64 |
+++ b/sys-apps/systemd/systemd-241-r1.ebuild |
65 |
@@ -169,6 +169,7 @@ src_prepare() { |
66 |
"${FILESDIR}"/CVE-2019-6454/0001-Refuse-dbus-message-paths-longer-than-BUS_PATH_SIZE_.patch |
67 |
"${FILESDIR}"/CVE-2019-6454/0002-Allocate-temporary-strings-to-hold-dbus-paths-on-the.patch |
68 |
"${FILESDIR}"/241-version-dep.patch |
69 |
+ "${FILESDIR}"/242-gcc-9.patch |
70 |
) |
71 |
|
72 |
if ! use vanilla; then |
73 |
|
74 |
diff --git a/sys-apps/systemd/systemd-242.ebuild b/sys-apps/systemd/systemd-242.ebuild |
75 |
index 201667ade31..d09494587fc 100644 |
76 |
--- a/sys-apps/systemd/systemd-242.ebuild |
77 |
+++ b/sys-apps/systemd/systemd-242.ebuild |
78 |
@@ -170,6 +170,7 @@ src_prepare() { |
79 |
|
80 |
# Add local patches here |
81 |
PATCHES+=( |
82 |
+ "${FILESDIR}"/242-gcc-9.patch |
83 |
) |
84 |
|
85 |
if ! use vanilla; then |