All of lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] package/gdb: use stat() privided by the system
Date: Sun,  9 Sep 2018 18:37:50 +0200	[thread overview]
Message-ID: <20180909163750.14196-2-romain.naour@gmail.com> (raw)
In-Reply-To: <20180909163750.14196-1-romain.naour@gmail.com>

Use the same workaround [1] as gnulib use to get the original
definition of stat. Otherwise with musl toolchains, gnulib try to use
rpl_stat which is not defined.

Fixes:
https://gitlab.com/free-electrons/toolchains-builder/-/jobs/95552308

[1] http://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/stat.c?id=c9d72f69bd201a1ab31464d91f234ea1817fe0e1

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 ...mon-utils-use-stat-privided-by-the-system.patch | 37 ++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 package/gdb/8.1.1/0006-gdb-common-utils-use-stat-privided-by-the-system.patch

diff --git a/package/gdb/8.1.1/0006-gdb-common-utils-use-stat-privided-by-the-system.patch b/package/gdb/8.1.1/0006-gdb-common-utils-use-stat-privided-by-the-system.patch
new file mode 100644
index 0000000000..650d963b9e
--- /dev/null
+++ b/package/gdb/8.1.1/0006-gdb-common-utils-use-stat-privided-by-the-system.patch
@@ -0,0 +1,37 @@
+From a7848d4244ffa8db7bf4ab0d5152f57e71600420 Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@gmail.com>
+Date: Sun, 9 Sep 2018 12:53:34 +0200
+Subject: [PATCH] gdb/common-utils: use stat() privided by the system
+
+Use the same workaround [1] as gnulib use to get the original
+definition of stat. Otherwise with musl toolchains, gnulib try to use
+rpl_stat which is not defined.
+
+Fixes:
+https://gitlab.com/free-electrons/toolchains-builder/-/jobs/95552308
+
+[1] http://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/stat.c?id=c9d72f69bd201a1ab31464d91f234ea1817fe0e1
+
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ gdb/common/common-utils.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/gdb/common/common-utils.c b/gdb/common/common-utils.c
+index 80de826ba78..d3577c7ff5c 100644
+--- a/gdb/common/common-utils.c
++++ b/gdb/common/common-utils.c
+@@ -20,7 +20,10 @@
+ #include "common-defs.h"
+ #include "common-utils.h"
+ #include "host-defs.h"
++/* Get the original definition of stat.  It might be defined as a macro.  */
++#define __need_system_sys_stat_h
+ #include <sys/stat.h>
++#undef __need_system_sys_stat_h
+ #include <ctype.h>
+ 
+ /* The xmalloc() (libiberty.h) family of memory management routines.
+-- 
+2.14.4
+
-- 
2.14.4

  reply	other threads:[~2018-09-09 16:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-09 16:37 [Buildroot] [PATCH 1/2] package/gdb: move patch directory Romain Naour
2018-09-09 16:37 ` Romain Naour [this message]
2018-09-10 15:49   ` [Buildroot] [PATCH 2/2] package/gdb: use stat() privided by the system Thomas Petazzoni
2018-09-10 21:20     ` Romain Naour
     [not found]       ` <20180910224128.GT1878@brightrain.aerifal.cx>
2018-09-11  6:46         ` Thomas Petazzoni
2018-09-12 21:46   ` Thomas Petazzoni
2018-09-10 15:22 ` [Buildroot] [PATCH 1/2] package/gdb: move patch directory Thomas Petazzoni
2018-10-01 14:59 ` Peter Korsgaard

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=20180909163750.14196-2-romain.naour@gmail.com \
    --to=romain.naour@gmail.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.