From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/mraa: fix musl build
Date: Tue, 2 Feb 2016 16:27:38 +0100 [thread overview]
Message-ID: <56B0CAEA.4080508@mind.be> (raw)
In-Reply-To: <1454227344-20681-1-git-send-email-bernd.kuhls@t-online.de>
On 31-01-16 09:02, Bernd Kuhls wrote:
> These build error have not yet being found by the autobuilders:
>
> /home/bernd/buildroot/br3/output/build/mraa-v0.9.0/src/uart/uart.c: In function ?mraa_uart_set_mode?:
> /home/bernd/buildroot/br3/output/build/mraa-v0.9.0/src/uart/uart.c:364:40: error: ?CMSPAR? undeclared (first use in this function)
> termio.c_cflag |= PARENB | CMSPAR | PARODD;
> ^
> /home/bernd/buildroot/br3/output/build/mraa-v0.9.0/src/uart/uart.c:364:40: note: each undeclared identifier is reported only once for each function it appears in
> /home/bernd/buildroot/br3/output/build/mraa-v0.9.0/src/uart/uart.c: In function ?mraa_uart_data_available?:
> /home/bernd/buildroot/br3/output/build/mraa-v0.9.0/src/uart/uart.c:491:20: error: storage size of ?timeout? isn?t known
> struct timeval timeout;
> ^
> /home/bernd/buildroot/br3/output/build/mraa-v0.9.0/src/uart/uart.c:502:5: error: unknown type name ?fd_set?
> fd_set readfds;
>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> .../0003-uart.c-fix-build-with-musl-libc.patch | 40 ++++++++++++++++++++++
> 1 file changed, 40 insertions(+)
> create mode 100644 package/mraa/0003-uart.c-fix-build-with-musl-libc.patch
>
> diff --git a/package/mraa/0003-uart.c-fix-build-with-musl-libc.patch b/package/mraa/0003-uart.c-fix-build-with-musl-libc.patch
> new file mode 100644
> index 0000000..75ceb6f
> --- /dev/null
> +++ b/package/mraa/0003-uart.c-fix-build-with-musl-libc.patch
> @@ -0,0 +1,40 @@
> +From 30e4abcd5f53bac50da874ba8795388fc05f5252 Mon Sep 17 00:00:00 2001
> +From: Bernd Kuhls <bernd.kuhls@t-online.de>
> +Date: Sun, 31 Jan 2016 08:57:05 +0100
> +Subject: [PATCH 1/1] uart.c: fix build with musl libc
> +
> +musl does not define CMSPAR on all archs, patch inspired by
> +http://git.alpinelinux.org/cgit/aports/plain/main/freerdp/musl-fix.patch
> +
> +musl needs sys/select.h to provide fd_set.
> +
> +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Regards,
Arnout
> +---
> +Patch sent upstream: https://github.com/intel-iot-devkit/mraa/pull/418
> +
> + src/uart/uart.c | 5 +++++
> + 1 file changed, 5 insertions(+)
> +
> +diff --git a/src/uart/uart.c b/src/uart/uart.c
> +index 6d3973a..0f8a2e3 100644
> +--- a/src/uart/uart.c
> ++++ b/src/uart/uart.c
> +@@ -29,10 +29,15 @@
> + #include <unistd.h>
> + #include <string.h>
> + #include <termios.h>
> ++#include <sys/select.h>
> +
> + #include "uart.h"
> + #include "mraa_internal.h"
> +
> ++#ifndef CMSPAR
> ++#define CMSPAR 010000000000
> ++#endif
> ++
> + // This function takes an unsigned int and converts it to a B* speed_t
> + // that can be used with linux/posix termios
> + static speed_t
> +--
> +2.7.0.rc3
> +
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
prev parent reply other threads:[~2016-02-02 15:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-31 8:02 [Buildroot] [PATCH 1/1] package/mraa: fix musl build Bernd Kuhls
2016-02-02 15:27 ` Arnout Vandecappelle [this message]
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=56B0CAEA.4080508@mind.be \
--to=arnout@mind.be \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox