[oe-commits] [openembedded-core] 09/14: systemd: Backport patch to fix build with gcc9

git at git.openembedded.org git at git.openembedded.org
Wed May 8 20:10:03 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit a3dd2c5d89ce9f5c760e092720f782509c3861a3
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Tue May 7 16:53:39 2019 -0700

    systemd: Backport patch to fix build with gcc9
    
    Do not disable the warning as error for overflow, which was a workaround
    until the real fix came in.
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 ...work-remove-redunant-link-name-in-message.patch | 41 ++++++++++++++++++++++
 meta/recipes-core/systemd/systemd_242.bb           |  3 +-
 2 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd/0006-network-remove-redunant-link-name-in-message.patch b/meta/recipes-core/systemd/systemd/0006-network-remove-redunant-link-name-in-message.patch
new file mode 100644
index 0000000..33f482a
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0006-network-remove-redunant-link-name-in-message.patch
@@ -0,0 +1,41 @@
+From 9e6940858c7dbdd56b297bdf49f58d623e3430b7 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.
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+Upstream-Status: backport [https://github.com/systemd/systemd/commit/c98b3545008d8e984ab456dcf79787418fcbfe13]
+---
+ 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 3e334c8d29..a158c01bbd 100644
+--- a/src/network/networkd-link.c
++++ b/src/network/networkd-link.c
+@@ -321,8 +321,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));
+ 
+-- 
+2.21.0
+
diff --git a/meta/recipes-core/systemd/systemd_242.bb b/meta/recipes-core/systemd/systemd_242.bb
index 69b1f7e..3012f20 100644
--- a/meta/recipes-core/systemd/systemd_242.bb
+++ b/meta/recipes-core/systemd/systemd_242.bb
@@ -22,6 +22,7 @@ SRC_URI += "file://touchscreen.rules \
            file://0003-implment-systemd-sysv-install-for-OE.patch \
            file://0004-rules-whitelist-hd-devices.patch \
            file://0005-rules-watch-metadata-changes-in-ide-devices.patch \
+           file://0006-network-remove-redunant-link-name-in-message.patch \
            file://99-default.preset \
            "
 
@@ -204,8 +205,6 @@ EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \
                   -Dsulogin-path=${base_sbindir}/sulogin \
                   -Dumount-path=${base_bindir}/umount"
 
-CFLAGS += "-Wno-error=format-overflow"
-
 do_install() {
 	meson_do_install
 	install -d ${D}/${base_sbindir}

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list