Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From ae1cf6d0eb1833e46549328a4473222c259723d7 Mon Sep 17 00:00:00 2001 |
| 2 | From: Andrea Adami <andrea.adami@gmail.com> |
| 3 | Date: Thu, 1 Feb 2018 00:25:00 +0100 |
| 4 | Subject: [PATCH] mtd-utils: common.h: no features.h for klibc builds |
| 5 | |
| 6 | Add guard around features.h to fix missing include (here first error): |
| 7 | |
| 8 | ../git/include/common.h:29:10: |
| 9 | fatal error: features.h: No such file or directory |
| 10 | #include <features.h> |
| 11 | ^~~~~~~~~~~~ |
| 12 | compilation terminated |
| 13 | |
| 14 | Upstream-Status: Submitted |
| 15 | |
| 16 | Signed-off-by: Andrea Adami <andrea.adami@gmail.com> |
| 17 | --- |
| 18 | include/common.h | 3 +++ |
| 19 | 1 file changed, 3 insertions(+) |
| 20 | |
| 21 | diff --git a/include/common.h b/include/common.h |
| 22 | index 642c212..f7c71fe 100644 |
| 23 | --- a/include/common.h |
| 24 | +++ b/include/common.h |
| 25 | @@ -26,7 +26,10 @@ |
| 26 | #include <string.h> |
| 27 | #include <fcntl.h> |
| 28 | #include <errno.h> |
| 29 | +#if defined(__KLIBC__) |
| 30 | +#else |
| 31 | #include <features.h> |
| 32 | +#endif |
| 33 | #include <inttypes.h> |
| 34 | #include <unistd.h> |
| 35 | #include <sys/sysmacros.h> |
| 36 | -- |
| 37 | 2.7.4 |
| 38 | |