All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/gdb: use stat() privided by the system
@ 2018-09-09 11:14 Romain Naour
  0 siblings, 0 replies; only message in thread
From: Romain Naour @ 2018-09-09 11:14 UTC (permalink / raw)
  To: buildroot

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/0006-gdb-common-utils-use-stat-privided-by-the-system.patch

diff --git a/package/gdb/8.1/0006-gdb-common-utils-use-stat-privided-by-the-system.patch b/package/gdb/8.1/0006-gdb-common-utils-use-stat-privided-by-the-system.patch
new file mode 100644
index 0000000000..448e716388
--- /dev/null
+++ b/package/gdb/8.1/0006-gdb-common-utils-use-stat-privided-by-the-system.patch
@@ -0,0 +1,37 @@
+From e38a28a537652115f8ab78089bc35d351e7c32f6 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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-09-09 11:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-09 11:14 [Buildroot] [PATCH] package/gdb: use stat() privided by the system Romain Naour

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.