[packages/systemd] - fix building with gcc 9.x - rel 2

baggins baggins at pld-linux.org
Thu Aug 29 01:02:22 CEST 2019


commit 90e41e0d4918e0caeb193fcd9f504479f2568a70
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Aug 29 01:02:38 2019 +0200

    - fix building with gcc 9.x
    - rel 2

 gcc9.patch   | 35 +++++++++++++++++++++++++++++++++++
 systemd.spec |  4 +++-
 2 files changed, 38 insertions(+), 1 deletion(-)
---
diff --git a/systemd.spec b/systemd.spec
index 944628b..d1d2abc 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -29,7 +29,7 @@ Summary(pl.UTF-8):	systemd - zarządca systemu i usług dla Linuksa
 Name:		systemd
 # Verify ChangeLog and NEWS when updating (since there are incompatible/breaking changes very often)
 Version:	242
-Release:	1
+Release:	2
 Epoch:		1
 License:	GPL v2+ (udev), LGPL v2.1+ (the rest)
 Group:		Base
@@ -77,6 +77,7 @@ Patch12:	uids_gids.patch
 Patch13:	sysctl.patch
 Patch14:	pld-pam-%{name}-user.patch
 Patch15:	%{name}-seccomp_disable_on_i386.patch
+Patch16:	gcc9.patch
 URL:		https://www.freedesktop.org/wiki/Software/systemd/
 BuildRequires:	acl-devel
 %{?with_audit:BuildRequires:	audit-libs-devel}
@@ -673,6 +674,7 @@ Uzupełnianie parametrów w zsh dla poleceń udev.
 %patch13 -p1
 %patch14 -p1
 %patch15 -p1
+%patch16 -p1
 
 cp -p %{SOURCE2} src/systemd_booted.c
 
diff --git a/gcc9.patch b/gcc9.patch
new file mode 100644
index 0000000..e12d657
--- /dev/null
+++ b/gcc9.patch
@@ -0,0 +1,35 @@
+From c98b3545008d8e984ab456dcf79787418fcbfe13 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek at in.waw.pl>
+Date: Tue, 7 May 2019 13:46:55 +0200
+Subject: [PATCH] network: remove redunant link name in message
+
+Fixes #12454.
+
+gcc was complaining that the link->ifname argument is NULL. Adding
+assert(link->ifname) right before the call has no effect. It seems that
+gcc is confused by the fact that log_link_warning_errno() internally
+calls log_object(), with link->ifname passed as the object. log_object()
+is also a macro and is does a check whether the passed object is NULL.
+So we have a check if something is NULL right next an unconditional use
+of it where it cannot be NULL. I think it's a bug in gcc.
+
+Anyway, we don't need to use link->ifname here. log_object() already prepends
+the object name to the message.
+---
+ src/network/networkd-link.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
+index 533193ac932..6fc82940033 100644
+--- a/src/network/networkd-link.c
++++ b/src/network/networkd-link.c
+@@ -338,8 +338,7 @@ static int link_enable_ipv6(Link *link) {
+ 
+         r = sysctl_write_ip_property_boolean(AF_INET6, link->ifname, "disable_ipv6", disabled);
+         if (r < 0)
+-                log_link_warning_errno(link, r, "Cannot %s IPv6 for interface %s: %m",
+-                                       enable_disable(!disabled), link->ifname);
++                log_link_warning_errno(link, r, "Cannot %s IPv6: %m", enable_disable(!disabled));
+         else
+                 log_link_info(link, "IPv6 successfully %sd", enable_disable(!disabled));
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/systemd.git/commitdiff/90e41e0d4918e0caeb193fcd9f504479f2568a70



More information about the pld-cvs-commit mailing list