Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From 48a580bd402cf6a3ee9e42013653219bfeb3caf6 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Thu, 21 Jun 2018 18:39:16 -0700 |
| 4 | Subject: [PATCH] include sys/types.h for uint definition |
| 5 | |
| 6 | uint is defined in sys/types.h, therefore this |
| 7 | header needs to be included, it gets exposed with |
| 8 | musl where this header is not getting included indirectly |
| 9 | as it is happening when building on glibc |
| 10 | |
| 11 | Fixes build errors on musl e.g. |
| 12 | upm/src/kx122/kx122.hpp:456:31: error: 'uint' has not been declared |
| 13 | | void setBufferThreshold(uint samples); |
| 14 | | ^~~~ |
| 15 | |
| 16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 17 | --- |
| 18 | Upstream-Status: Submitted [https://github.com/intel-iot-devkit/upm/pull/656] |
| 19 | src/kx122/kx122.h | 1 + |
| 20 | 1 file changed, 1 insertion(+) |
| 21 | |
| 22 | diff --git a/src/kx122/kx122.h b/src/kx122/kx122.h |
| 23 | index 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> |