Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] systemd: Fix build with gcc9
@ 2019-05-06 17:51 Khem Raj
  2019-05-06 17:51 ` [PATCH 2/2] gcc-target: Do not set --with-sysroot and gxx-include-dir paths Khem Raj
  2019-05-06 18:23 ` [PATCH 1/2] systemd: Fix build with gcc9 Adrian Bunk
  0 siblings, 2 replies; 6+ messages in thread
From: Khem Raj @ 2019-05-06 17:51 UTC (permalink / raw)
  To: openembedded-core

gcc9 throws additional warnings about format string overflow

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...-format-overflow-warnings-with-gcc-9.patch | 41 +++++++++++++++++++
 meta/recipes-core/systemd/systemd_242.bb      |  1 +
 2 files changed, 42 insertions(+)
 create mode 100644 meta/recipes-core/systemd/systemd/0006-Fix-format-overflow-warnings-with-gcc-9.patch

diff --git a/meta/recipes-core/systemd/systemd/0006-Fix-format-overflow-warnings-with-gcc-9.patch b/meta/recipes-core/systemd/systemd/0006-Fix-format-overflow-warnings-with-gcc-9.patch
new file mode 100644
index 0000000000..510ac22150
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0006-Fix-format-overflow-warnings-with-gcc-9.patch
@@ -0,0 +1,41 @@
+From c8050da8b7b0e59e4d1d0e15a92b9ecad299dbbb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 6 May 2019 10:41:15 -0700
+Subject: [PATCH] Fix format-overflow warnings with gcc-9
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+gcc-9 has become a bit stricter and can check all kind of formatted
+input/output functions which causes additional warnings when compiling
+networkd
+
+/src/basic/log.h:104:9: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
+         log_internal_realm(LOG_REALM_PLUS_LEVEL(LOG_REALM, (level)), __VA_ARGS__)
+
+see https://github.com/systemd/systemd/issues/12454
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/network/networkd-link.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
+index 533193ac93..976cbbeaaa 100644
+--- a/src/network/networkd-link.c
++++ b/src/network/networkd-link.c
+@@ -339,7 +339,8 @@ 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);
++                                       enable_disable(!disabled),
++                                       (link->ifname) ? link->ifname : "<null>");
+         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 a6b39d57e8..93c4472bab 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-Fix-format-overflow-warnings-with-gcc-9.patch \
            file://99-default.preset \
            "
 
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-05-14  3:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-06 17:51 [PATCH 1/2] systemd: Fix build with gcc9 Khem Raj
2019-05-06 17:51 ` [PATCH 2/2] gcc-target: Do not set --with-sysroot and gxx-include-dir paths Khem Raj
2019-05-06 18:23 ` [PATCH 1/2] systemd: Fix build with gcc9 Adrian Bunk
2019-05-13 23:27   ` Burton, Ross
2019-05-14  3:21     ` Khem Raj
2019-05-14  3:56       ` Burton, Ross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox