mtd: fix musl build issue
PATCH v2 1/2 mtd: fix musl build issue
With musl C library, we get following build error
integck.c:37:28: fatal error: bits/stdio_lim.h: No such file or directory
#include <bits/stdio_lim.h>
^ compilation terminated.
make[2]: *** [integck] Error 1
Header <bits/stdio_lim.h> is not available in musl C library. However <stdio.h> has all definition that <bits/stdio_lim.h> supposed to be providing. Moreover <bits/stdio_lim.h> shouldn't be included directly instead we should be using <stdio.h>.
Since we already include <stdio.h> and in case of uClibc or glibc <bits/stdio_lim.h> gets included internally, we can safely remove it.
Fixes:
http://autobuild.buildroot.net/results/175/1754861457af520480cc34d7d2d0edff2868ff66/
---
Changes v1 -> v2:
- No changes
--- ...tegrity-don-t-include-header-bits-stdio_l.patch | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 package/mtd/0003-fs-tests-integrity-don-t-include-header-bits-stdio_l.patch
package/mtd/0003-fs-tests-integrity-don-t-include-header-bits-stdio_l.patch new file +45 -0
@@ -0,0 +1,45 @@ +From 600ab10e3b452cdffc6c82770b0bb2ff5c23ad70 Mon Sep 17 00:00:00 2001 +From: Rahul Bedarkar <[email protected]> +Date: Fri, 12 Aug 2016 22:59:35 +0530 +Subject: [PATCH 1/1] fs-tests: integrity: don't include header + <bits/stdio_lim.h> + +With musl C library, we get following build error + +integck.c:37:28: fatal error: bits/stdio_lim.h: No such file or directory + #include <bits/stdio_lim.h> + ^ +compilation terminated. +make[2]: *** [integck] Error 1 + +Header <bits/stdio_lim.h> is not available in musl C library. However +<stdio.h> has all definition that <bits/stdio_lim.h> supposed to be +providing. Moreover <bits/stdio_lim.h> shouldn't be included directly +instead we should be using <stdio.h>. + +Since we already include <stdio.h> and in case of uClibc or glibc +<bits/stdio_lim.h> gets included internally, we can safely remove it. + +This build issue is found by Buildroot autobuilder +http://autobuild.buildroot.net/results/175/1754861457af520480cc34d7d2d0edff2868ff66/ + +Signed-off-by: Rahul Bedarkar <[email protected]> +--- + tests/fs-tests/integrity/integck.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c +index 6ef817e..0bb9711 100644 +--- a/tests/fs-tests/integrity/integck.c ++++ b/tests/fs-tests/integrity/integck.c +@@ -34,7 +34,6 @@ + #ifdef INTEGCK_DEBUG + #include <execinfo.h> + #endif +-#include <bits/stdio_lim.h> + #include <sys/mman.h> + #include <sys/vfs.h> + #include <sys/mount.h> +-- +2.6.2 +
Signature · 1 line
2.6.2
PATCH v2 2/2 wayland: fix musl build issue
With musl C library, we see following build failure.
src/scanner.c: In function 'find_enumeration':
src/scanner.c:811:2: error: unknown type name 'uint'
uint idx = 0, j;
^uint is defined in <sys/types.h> header. It is usually included by <stdlib.h> but in musl stdlib.h doesn't include it.
This patch adds upstream patch where uint32_t is used instead of uint.
Fixes:
http://autobuild.buildroot.net/results/fcf/fcf6dd3bd31f92eadbcae17338e5887a23e43ff9/
---
Changes v1 -> v2:
- Backport upstream patch instead of adding new patch (suggested by Khem Raj)
--- ...0002-scanner-Use-uint32_t-instead-of-uint.patch | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 package/wayland/0002-scanner-Use-uint32_t-instead-of-uint.patch
package/wayland/0002-scanner-Use-uint32_t-instead-of-uint.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 6750b47d9e0d3074d2e56aa36c476493f533d696 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 15 Jul 2016 16:23:48 -0700 +Subject: [PATCH 1/1] scanner: Use uint32_t instead of uint + +uint32_t is C99 defined stdint type + +Signed-off-by: Khem Raj <[email protected]> +Reviewed-by: Daniel Stone <[email protected]> +[Rahul Bedarkar: Backported from: 6750b47d9e0d3074d2e56aa36c476493f533d696] +Signed-off-by: Rahul Bedarkar <[email protected]> +--- + src/scanner.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/scanner.c b/src/scanner.c +index 6e2c3a3..ebae4cc 100644 +--- a/src/scanner.c ++++ b/src/scanner.c +@@ -819,7 +819,7 @@ find_enumeration(struct protocol *protocol, + struct interface *i; + struct enumeration *e; + char *enum_name; +- uint idx = 0, j; ++ uint32_t idx = 0, j; + + for (j = 0; j + 1 < strlen(enum_attribute); j++) { + if (enum_attribute[j] == '.') { +-- +2.6.2 +
Signature · 1 line
2.6.2
PATCH v2 2/2 wayland: fix musl build issue
Rahul, All,
On 2016-08-15 11:45 +0530, Rahul Bedarkar spake thusly:
Quoted 10 lines
With musl C library, we see following build failure.
src/scanner.c: In function 'find_enumeration':
src/scanner.c:811:2: error: unknown type name 'uint'uint idx = 0, j; ^uint is defined in <
sys/types.h> header. It is usually included by <stdlib.h> but in muslstdlib.hdoesn't include it.
Quoted 8 lines
This patch adds upstream patch where
uint32_tis used instead of uint.Fixes:
http://autobuild.buildroot.net/results/fcf/fcf6dd3bd31f92eadbcae17338e5887a23e43ff9/
Cc Khem Raj <[email protected]>Signed-off-by Rahul Bedarkar <[email protected]>
Regards,
Yann E. MORIN.
Quoted 52 lines
---
Changes v1 -> v2:
- Backport upstream patch instead of adding new patch (suggested by Khem Raj)--- ...0002-scanner-Use-uint32_t-instead-of-uint.patch | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 package/wayland/0002-scanner-Use-uint32_t-instead-of-uint.patchpackage/wayland/0002-scanner-Use-uint32_t-instead-of-uint.patch new file +31
-0@@ -0,0 +1,31 @@ +From 6750b47d9e0d3074d2e56aa36c476493f533d696 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 15 Jul 2016 16:23:48 -0700 +Subject: [PATCH 1/1] scanner: Use uint32_t instead of uint + +uint32_t is C99 defined stdint type + +Signed-off-by: Khem Raj <[email protected]> +Reviewed-by: Daniel Stone <[email protected]> +[Rahul Bedarkar: Backported from: 6750b47d9e0d3074d2e56aa36c476493f533d696] +Signed-off-by: Rahul Bedarkar <[email protected]> +--- + src/scanner.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/scanner.c b/src/scanner.c +index 6e2c3a3..ebae4cc 100644 +--- a/src/scanner.c ++++ b/src/scanner.c +@@ -819,7 +819,7 @@ find_enumeration(struct protocol *protocol, + struct interface *i; + struct enumeration *e; + char *enum_name; +- uint idx = 0, j; ++ uint32_t idx = 0, j; + + for (j = 0; j + 1 < strlen(enum_attribute); j++) { + if (enum_attribute[j] == '.') { +-- +2.6.2 +Signature · 6 lines
2.6.2 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 2/2 wayland: fix musl build issue
In reply to Rahul BedarkarQuoted 15 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Rahul" == Rahul Bedarkar <[email protected]> writes:
With musl C library, we see following build failure.
src/scanner.c: In function 'find_enumeration':
src/scanner.c:811:2: error: unknown type name 'uint'uint idx = 0, j; ^uint is defined in <
sys/types.h> header. It is usually included by <stdlib.h> but in muslstdlib.hdoesn't include it.This patch adds upstream patch where
uint32_tis used instead of uint.Fixes:
Quoted 7 lines
http://autobuild.buildroot.net/results/fcf/fcf6dd3bd31f92eadbcae17338e5887a23e43ff9/
Cc Khem Raj <[email protected]>Signed-off-by Rahul Bedarkar <[email protected]>---
Changes v1 -> v2:
- Backport upstream patch instead of adding new patch (suggested by Khem Raj)
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 1/2 mtd: fix musl build issue
In reply to Rahul BedarkarQuoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Rahul" == Rahul Bedarkar <[email protected]> writes:
With musl C library, we get following build error
integck.c:37:28: fatal error:bits/stdio_lim.h: No such file or directory#include <bits/stdio_lim.h> ^compilation terminated.
make[2]: *** [integck] Error 1Header <
bits/stdio_lim.h> is not available in musl C library. However <stdio.h> has all definition that <bits/stdio_lim.h> supposed to be providing. Moreover <bits/stdio_lim.h> shouldn't be included directly instead we should be using <stdio.h>.
Quoted 8 lines
Since we already include <
stdio.h> and in case of uClibc or glibc <bits/stdio_lim.h> gets included internally, we can safely remove it.Fixes:
http://autobuild.buildroot.net/results/175/1754861457af520480cc34d7d2d0edff2868ff66/
Signed-off-by Rahul Bedarkar <[email protected]>
Committed, thanks.
Please submit the change upstream as well.
Signature · 1 line
Bye, Peter Korsgaard