configs: nitrogen*: bump kernel and u-boot revisions
[buildroot-gz.git] / package / util-linux / 0003-build-sys-fix-compilation-with-ncurses-and-uClibc-or.patch
blob2a1e56dfe9e04475353cc15fe7b75780f891a94a
1 From 9ea8ded37b648bbd538cbf9c4d144b8b1a93c1b5 Mon Sep 17 00:00:00 2001
2 From: Carlos Santos <casantos@datacom.ind.br>
3 Date: Thu, 19 Jan 2017 17:27:37 -0200
4 Subject: [PATCH] build-sys: fix compilation with ncurses and uClibc or musl
5 libc
7 Compiling util-linux with musl and uClibc-ng toolchains when wide-char
8 support is not enabled in ncurses results in compilation failures with
9 the following message:
11 error: two or more data types in declaration specifiers
12 #define
13 wchar_t char
15 The problem occurs because util-linux #defines its own wchar_t (as char)
16 when configured without widechar support. This conflicts with definition
17 of wchar_t contained in stddef.h.
19 This error can be reproduced running "<toolchain-cc -o test test.c" with
20 the following test program:
22 #include <ctype.h>
23 #define wchar_t char
24 #include <stddef.h>
26 int main()
28 return 0;
31 The only way to avoid the problem it to reorder the inclusion of headers
32 in some files under the text-utils directory.
34 Addresses:
35 http://autobuild.buildroot.net/results/3a2f228e0fa7b5cc28a13d49f48f1a6aef8d9d7a
36 http://autobuild.buildroot.net/results/99e96069f652d511c6212a5bb6be29e68fb1747c
37 http://autobuild.buildroot.net/results/2dc5721aef93b7b410153bafad78248fac3db941
38 http://autobuild.buildroot.net/results/8a9e197ba7a292b18f8c0c36dca974685556a38a
40 Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
41 ---
42 text-utils/colcrt.c | 2 +-
43 text-utils/colrm.c | 2 +-
44 text-utils/column.c | 2 +-
45 3 files changed, 3 insertions(+), 3 deletions(-)
47 diff --git a/text-utils/colcrt.c b/text-utils/colcrt.c
48 index c6bba4b..346a10f 100644
49 --- a/text-utils/colcrt.c
50 +++ b/text-utils/colcrt.c
51 @@ -46,8 +46,8 @@
52 #include <getopt.h>
54 #include "nls.h"
55 -#include "widechar.h"
56 #include "c.h"
57 +#include "widechar.h"
58 #include "closestream.h"
61 diff --git a/text-utils/colrm.c b/text-utils/colrm.c
62 index 9510b72..d474696 100644
63 --- a/text-utils/colrm.c
64 +++ b/text-utils/colrm.c
65 @@ -44,9 +44,9 @@
66 #include <unistd.h>
68 #include "nls.h"
69 -#include "widechar.h"
70 #include "strutils.h"
71 #include "c.h"
72 +#include "widechar.h"
73 #include "closestream.h"
76 diff --git a/text-utils/column.c b/text-utils/column.c
77 index 43b3af5..2eb47a3 100644
78 --- a/text-utils/column.c
79 +++ b/text-utils/column.c
80 @@ -50,8 +50,8 @@
81 #include <getopt.h>
83 #include "nls.h"
84 -#include "widechar.h"
85 #include "c.h"
86 +#include "widechar.h"
87 #include "xalloc.h"
88 #include "strutils.h"
89 #include "closestream.h"
90 --
91 2.7.4