aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-test/diag/diag/0001-Fix-build-with-musl.patch47
-rw-r--r--recipes-test/diag/diag_git.bb4
2 files changed, 50 insertions, 1 deletions
diff --git a/recipes-test/diag/diag/0001-Fix-build-with-musl.patch b/recipes-test/diag/diag/0001-Fix-build-with-musl.patch
new file mode 100644
index 0000000..08e6e76
--- /dev/null
+++ b/recipes-test/diag/diag/0001-Fix-build-with-musl.patch
@@ -0,0 +1,47 @@
+From 7a9af4c0c9b1b176c6ca57ed020c215926b33018 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 23 Sep 2018 00:17:06 -0700
+Subject: [PATCH] Fix build with musl
+
+Include needed headers to fix following errors
+
+| router/dm.h:41:1: error: unknown type name 'ssize_t'; did you mean 'size_t'?
+| ssize_t dm_send(struct diag_client *dm, const void *ptr, size_t len);
+| ^~~~~~~
+
+tools/send_data.c:55:9: error: variable 'tv' has initializer but
+incomplete type
+ struct timeval tv = {5, 0};
+ ^~~~~~~
+
+Upstream-Status: Submitted [https://github.com/andersson/diag/pull/2]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ router/diag.h | 1 +
+ tools/send_data.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/router/diag.h b/router/diag.h
+index df5398f..eb24a05 100644
+--- a/router/diag.h
++++ b/router/diag.h
+@@ -33,6 +33,7 @@
+ #define __DIAG_H__
+
+ #include <stdint.h>
++#include <sys/types.h>
+
+ #include "circ_buf.h"
+ #include "hdlc.h"
+diff --git a/tools/send_data.c b/tools/send_data.c
+index 2b8ee20..95ac274 100644
+--- a/tools/send_data.c
++++ b/tools/send_data.c
+@@ -33,6 +33,7 @@
+ #include <sys/un.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
++#include <sys/time.h>
+
+ #include <err.h>
+ #include <errno.h>
diff --git a/recipes-test/diag/diag_git.bb b/recipes-test/diag/diag_git.bb
index 640c537..6a8d3b6 100644
--- a/recipes-test/diag/diag_git.bb
+++ b/recipes-test/diag/diag_git.bb
@@ -3,7 +3,9 @@ HOMEPAGE = "https://github.com/andersson/diag"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=f6832ae4af693c6f31ffd931e25ef580"
-SRC_URI = "git://github.com/andersson/diag.git;protocol=https"
+SRC_URI = "git://github.com/andersson/diag.git;protocol=https \
+ file://0001-Fix-build-with-musl.patch \
+ "
PV = "0.0+git${SRCPV}"
SRCREV = "9de0697ec5447dddbc0caf5744042e41a3a7c2ea"