Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/luv: fix build with gcc 4.8
Date: Sun, 23 Feb 2020 09:26:44 +0100	[thread overview]
Message-ID: <20200223082643.GF8743@scaer> (raw)
In-Reply-To: <20200222213328.366748-1-fontaine.fabrice@gmail.com>

Fabrice, All,

On 2020-02-22 22:33 +0100, Fabrice Fontaine spake thusly:
> Fixes:
>  - http://autobuild.buildroot.org/results/83b34e606b128546da8a70836d039090e334a1ec
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Applied to master, after markign the patch as accepted upstream. Thanks!

Regards,
Yann E. MORIN.

> ---
>  ...01-src-lreq.c-fix-build-with-gcc-4.8.patch | 43 +++++++++++++++++++
>  1 file changed, 43 insertions(+)
>  create mode 100644 package/luv/0001-src-lreq.c-fix-build-with-gcc-4.8.patch
> 
> diff --git a/package/luv/0001-src-lreq.c-fix-build-with-gcc-4.8.patch b/package/luv/0001-src-lreq.c-fix-build-with-gcc-4.8.patch
> new file mode 100644
> index 0000000000..e9fd6430fb
> --- /dev/null
> +++ b/package/luv/0001-src-lreq.c-fix-build-with-gcc-4.8.patch
> @@ -0,0 +1,43 @@
> +From d05134115ec8fcfc87188899cec336a8b4df7e62 Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Sat, 22 Feb 2020 22:17:19 +0100
> +Subject: [PATCH] src/lreq.c: fix build with gcc 4.8
> +
> +Since commit 3e34390cc15101d7fc46ea26f5adf9ac022c2029, build fails with
> +gcc 4.8.3 on:
> +
> +In file included from /usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output/build/luv-1.34.1-1/src/luv.c:27:0:
> +/usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output/build/luv-1.34.1-1/src/lreq.c: In function 'luv_cleanup_req':
> +/usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output/build/luv-1.34.1-1/src/lreq.c:70:5: error: 'for' loop initial declarations are only allowed in C99 mode
> +     for (int i = 0; ((int*)(data->data))[i] != LUA_NOREF; i++) {
> +     ^
> +
> +Fixes:
> + - http://autobuild.buildroot.org/results/83b34e606b128546da8a70836d039090e334a1ec
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +[Upstream status: https://github.com/luvit/luv/pull/456]
> +---
> + src/lreq.c | 3 ++-
> + 1 file changed, 2 insertions(+), 1 deletion(-)
> +
> +diff --git a/src/lreq.c b/src/lreq.c
> +index c8e07eb..b12ec4f 100644
> +--- a/src/lreq.c
> ++++ b/src/lreq.c
> +@@ -64,10 +64,11 @@ static void luv_fulfill_req(lua_State* L, luv_req_t* data, int nargs) {
> + }
> + 
> + static void luv_cleanup_req(lua_State* L, luv_req_t* data) {
> ++  int i;
> +   luaL_unref(L, LUA_REGISTRYINDEX, data->req_ref);
> +   luaL_unref(L, LUA_REGISTRYINDEX, data->callback_ref);
> +   if (data->data_ref == LUV_REQ_MULTIREF) {
> +-    for (int i = 0; ((int*)(data->data))[i] != LUA_NOREF; i++) {
> ++    for (i = 0; ((int*)(data->data))[i] != LUA_NOREF; i++) {
> +       luaL_unref(L, LUA_REGISTRYINDEX, ((int*)(data->data))[i]);
> +     }
> +   }
> +-- 
> +2.25.0
> +
> -- 
> 2.25.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

      reply	other threads:[~2020-02-23  8:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-22 21:33 [Buildroot] [PATCH 1/1] package/luv: fix build with gcc 4.8 Fabrice Fontaine
2020-02-23  8:26 ` Yann E. MORIN [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=20200223082643.GF8743@scaer \
    --to=yann.morin.1998@free.fr \
    --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