From: Gustavo Zacarias <gustavo@zacarias.com.ar>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] dt: fix binary operation errors
Date: Tue, 8 Mar 2016 10:51:14 -0300 [thread overview]
Message-ID: <56DED8D2.8090805@zacarias.com.ar> (raw)
In-Reply-To: <1457139173-9535-1-git-send-email-sergio.prado@e-labworks.com>
On 04/03/16 21:52, Sergio Prado wrote:
> Some GCC toolchains does not define _BSD_SOURCE when passing -D_GNU_SOURCE, and
> that is causing the declaration of large_t as double.
>
> In that case, GCC is complaining in some binary operations like the code below:
>
> dtgen.c:1653:59: error: invalid operands to binary % (have ?large_t? and ?u_int32?)
> (dip->di_data_limit != INFINITY) && (dip->di_data_limit % dip->di_dsize) ) {
> ^
>
> This patch adds a statement in the include file to define large_t as
> "long long int" when __GNUC__ is defined.
>
> Fixes:
> http://autobuild.buildroot.net/results/e7b803bd007c125e23eeae351acfc08628333706
> http://autobuild.buildroot.net/results/72ca2970db41463435765b90c069417b8bb8a3fd
> http://autobuild.buildroot.net/results/22d18f0ca19898be02118c64e615ffbbb23ee46d
> http://autobuild.buildroot.net/results/ab50d1d4af47b026da77a81224500a4627c718ac
> ...
>
> Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
Hi Sergio.
Actually the correct fix is detecting/using _DEFAULT_SOURCE :
http://pkgs.fedoraproject.org/cgit/rpms/dt.git/commit/dt-default-source-define.patch?id=a3107b34a3efc6af66a5f892514f233bb66eb6b5
See: http://man7.org/linux/man-pages/man7/feature_test_macros.7.html
regarding _BSD_SOURCE deprecation and _DEFAULT_SOURCE.
Care to spin a v2 with the proper fix?
Regards.
prev parent reply other threads:[~2016-03-08 13:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-05 0:52 [Buildroot] [PATCH] dt: fix binary operation errors Sergio Prado
2016-03-08 13:51 ` Gustavo Zacarias [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=56DED8D2.8090805@zacarias.com.ar \
--to=gustavo@zacarias.com.ar \
--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