blob: a0a47411d7051fbc048baedc3aa6613c62df22a7 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 48a580bd402cf6a3ee9e42013653219bfeb3caf6 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 21 Jun 2018 18:39:16 -0700
4Subject: [PATCH] include sys/types.h for uint definition
5
6uint is defined in sys/types.h, therefore this
7header needs to be included, it gets exposed with
8musl where this header is not getting included indirectly
9as it is happening when building on glibc
10
11Fixes build errors on musl e.g.
12upm/src/kx122/kx122.hpp:456:31: error: 'uint' has not been declared
13| void setBufferThreshold(uint samples);
14| ^~~~
15
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18Upstream-Status: Submitted [https://github.com/intel-iot-devkit/upm/pull/656]
19 src/kx122/kx122.h | 1 +
20 1 file changed, 1 insertion(+)
21
22diff --git a/src/kx122/kx122.h b/src/kx122/kx122.h
23index 1622ed50..56e5215e 100644
24--- a/src/kx122/kx122.h
25+++ b/src/kx122/kx122.h
26@@ -31,6 +31,7 @@ extern "C"{
27 #include <assert.h>
28 #include <unistd.h>
29 #include <math.h>
30+#include <sys/types.h>
31
32 #include <mraa/i2c.h>
33 #include <mraa/spi.h>