aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-test/diag/diag/0001-Fix-build-with-musl.patch
blob: 08e6e7600d0b9414d09e23d42ebc858b3c813667 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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>