summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch')
-rw-r--r--meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch b/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch
new file mode 100644
index 000000000..eaaf30460
--- /dev/null
+++ b/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch
@@ -0,0 +1,34 @@
+From 2fa326b26dc479942367dc4283e2f87372403988 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 17 Jun 2017 09:32:04 -0700
+Subject: [PATCH] rtnl_flush: Error on failed write()
+
+Fixes
+route.c:45:2: error: ignoring return value of 'write', declared with attribute warn_unused_result [-Werror=unused-result]
+| write(fd, "-1", 2);
+| ^~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ route.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/route.c b/route.c
+index c552d1f..fc5c31e 100644
+--- a/route.c
++++ b/route.c
+@@ -42,7 +42,8 @@ static void rtnl_flush(void)
+ if (fd < 0)
+ return;
+
+- write(fd, "-1", 2);
++ if (write(fd, "-1", 2) < 0 )
++ perror("write");
+ close(fd);
+ }
+
+--
+2.13.1
+
OpenPOWER on IntegriCloud