summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch34
-rw-r--r--meta-networking/recipes-connectivity/relayd/relayd_git.bb4
2 files changed, 37 insertions, 1 deletions
diff --git a/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch b/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch
new file mode 100644
index 0000000000..eaaf30460f
--- /dev/null
+++ b/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch
@@ -0,0 +1,34 @@
1From 2fa326b26dc479942367dc4283e2f87372403988 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 17 Jun 2017 09:32:04 -0700
4Subject: [PATCH] rtnl_flush: Error on failed write()
5
6Fixes
7route.c:45:2: error: ignoring return value of 'write', declared with attribute warn_unused_result [-Werror=unused-result]
8| write(fd, "-1", 2);
9| ^~~~~~~~~~~~~~~~~~
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13Upstream-Status: Submitted
14
15 route.c | 3 ++-
16 1 file changed, 2 insertions(+), 1 deletion(-)
17
18diff --git a/route.c b/route.c
19index c552d1f..fc5c31e 100644
20--- a/route.c
21+++ b/route.c
22@@ -42,7 +42,8 @@ static void rtnl_flush(void)
23 if (fd < 0)
24 return;
25
26- write(fd, "-1", 2);
27+ if (write(fd, "-1", 2) < 0 )
28+ perror("write");
29 close(fd);
30 }
31
32--
332.13.1
34
diff --git a/meta-networking/recipes-connectivity/relayd/relayd_git.bb b/meta-networking/recipes-connectivity/relayd/relayd_git.bb
index ef28d2c424..98dc41a093 100644
--- a/meta-networking/recipes-connectivity/relayd/relayd_git.bb
+++ b/meta-networking/recipes-connectivity/relayd/relayd_git.bb
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://main.c;endline=17;md5=86aad799085683e0a2e1c2684a20bab
5 5
6DEPENDS = "libubox" 6DEPENDS = "libubox"
7 7
8SRC_URI = "git://git.openwrt.org/project/relayd.git" 8SRC_URI = "git://git.openwrt.org/project/relayd.git \
9 file://0001-rtnl_flush-Error-on-failed-write.patch \
10"
9 11
10SRCREV = "ad0b25ad74345d367c62311e14b279f5ccb8ef13" 12SRCREV = "ad0b25ad74345d367c62311e14b279f5ccb8ef13"
11PV = "0.0.1+git${SRCPV}" 13PV = "0.0.1+git${SRCPV}"