package/gdb: use stat() privided by the system
PATCH 1/1 package/gdb: 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
Signed-off-by Romain Naour <[email protected]>
Cc Thomas Petazzoni <[email protected]>
--- ...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
package/gdb/8.1/0006-gdb-common-utils-use-stat-privided-by-the-system.patch new file +37 -0
@@ -0,0 +1,37 @@ +From e38a28a537652115f8ab78089bc35d351e7c32f6 Mon Sep 17 00:00:00 2001 +From: Romain Naour <[email protected]> +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 <[email protected]> +--- + 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 +
Signature · 1 line
2.14.4