From: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] wayland: fix musl build issue
Date: Fri, 12 Aug 2016 23:45:02 +0530 [thread overview]
Message-ID: <1471025702-6945-2-git-send-email-rahul.bedarkar@imgtec.com> (raw)
In-Reply-To: <1471025702-6945-1-git-send-email-rahul.bedarkar@imgtec.com>
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.
In scanner.c, <expat.h> includes <stdlib.h> then it includes <sys/types.h> in
case of other C libraries. <sys/types.h> from musl defines uint only if
_GNU_SOURCE or _BSD_SOURCE is defined. Instead of including <sys/types.h> and
defining either _GNU_SOURCE or _BSD_SOURCE, use unsigned int instead of uint.
Fixes:
http://autobuild.buildroot.net/results/fcf/fcf6dd3bd31f92eadbcae17338e5887a23e43ff9/
Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
---
.../0002-use-unsigned-int-instead-of-uint.patch | 33 ++++++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 package/wayland/0002-use-unsigned-int-instead-of-uint.patch
diff --git a/package/wayland/0002-use-unsigned-int-instead-of-uint.patch b/package/wayland/0002-use-unsigned-int-instead-of-uint.patch
new file mode 100644
index 0000000..0f649e2
--- /dev/null
+++ b/package/wayland/0002-use-unsigned-int-instead-of-uint.patch
@@ -0,0 +1,33 @@
+scanner: use unsigned int instead of uint
+
+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.
+
+In scanner.c, <expat.h> includes <stdlib.h> then it includes <sys/types.h> in
+case of other C libraries. <sys/types.h> from musl defines uint only if
+_GNU_SOURCE or _BSD_SOURCE is defined. Instead of including <sys/types.h> and
+defining either _GNU_SOURCE or _BSD_SOURCE, use unsigned int instead of uint.
+
+This build issue is found by Buildroot autobuilder
+http://autobuild.buildroot.net/results/fcf/fcf6dd3bd31f92eadbcae17338e5887a23e43ff9/
+
+Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
+
+--- wayland-1.11.0/src/scanner.c.old 2016-08-12 23:19:39.944279494 +0530
++++ wayland-1.11.0/src/scanner.c 2016-08-12 23:19:57.236279457 +0530
+@@ -808,7 +808,7 @@ find_enumeration(struct protocol *protoc
+ struct interface *i;
+ struct enumeration *e;
+ char *enum_name;
+- uint idx = 0, j;
++ unsigned int idx = 0, j;
+
+ for (j = 0; j + 1 < strlen(enum_attribute); j++) {
+ if (enum_attribute[j] == '.') {
--
2.6.2
next prev parent reply other threads:[~2016-08-12 18:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-12 18:15 [Buildroot] [PATCH 1/2] mtd: fix musl build issue Rahul Bedarkar
2016-08-12 18:15 ` Rahul Bedarkar [this message]
2016-08-13 2:08 ` [Buildroot] [PATCH 2/2] wayland: " Khem Raj
2016-08-14 14:26 ` Yann E. MORIN
2016-08-15 5:37 ` Rahul Bedarkar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1471025702-6945-2-git-send-email-rahul.bedarkar@imgtec.com \
--to=rahul.bedarkar@imgtec.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.