aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-07-20 03:35:26 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2017-08-31 14:59:50 +0200
commit9c2d01f418de58624e3055f3d13ca1028cc82bdd (patch)
tree9e4262e919c0e7a66151b62f6c76544ffdf5394a /meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch
parent8da3ce99cac05227d39d8081ffbd12e0e5bde003 (diff)
downloadmeta-openembedded-contrib-9c2d01f418de58624e3055f3d13ca1028cc82bdd.tar.gz
ippool: Fix build errors found with hardening flags
Fix build with musl Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch')
-rw-r--r--meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch b/meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch
new file mode 100644
index 0000000000..6fb7cc5c46
--- /dev/null
+++ b/meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch
@@ -0,0 +1,28 @@
+From 5d7f20c045b3c74dad2c53d65e30bd4840250082 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 27 Jun 2017 15:17:19 -0700
+Subject: [PATCH] usl_timer: Check for return value of write() API
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ usl/usl_timer.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/usl/usl_timer.c b/usl/usl_timer.c
+index fda752b..d8414a6 100644
+--- a/usl/usl_timer.c
++++ b/usl/usl_timer.c
+@@ -94,7 +94,9 @@ void usl_timer_tick(void)
+
+ if (!usl_tick_pending) {
+ usl_tick_pending = 1;
+- write(usl_tick_pipe[1], &msg, sizeof(msg));
++ if (write(usl_tick_pipe[1], &msg, sizeof(msg)) != sizeof(msg)) {
++ fprintf(stderr, "write to fd %i failed: %s\n", usl_tick_pipe[1], strerror(errno));
++ }
+ }
+ }
+
+--
+2.13.2
+