From: Marcin Chojnacki <marcinch7@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] toolchain/wrapper: fix building without glibc
Date: Sat, 31 Dec 2016 16:30:17 +0100 [thread overview]
Message-ID: <20161231153017.10545-1-marcinch7@gmail.com> (raw)
toolchain-wrapper.c now uses program_invocation_short_name, which is
a glibc specific extension. This causes build to fail when using a
system with libc different than glibc (musl, BSD libc, etc.)
This change makes toolchain-wrapper.c portable, by setting it's value
to getprogname() when __GLIBC__ is not defined, and thus makes running
buildroot possible on glibc-less systems.
Signed-off-by: Marcin Chojnacki <marcinch7@gmail.com>
---
toolchain/toolchain-wrapper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/toolchain/toolchain-wrapper.c b/toolchain/toolchain-wrapper.c
index 100aa18..8eb0aca 100644
--- a/toolchain/toolchain-wrapper.c
+++ b/toolchain/toolchain-wrapper.c
@@ -141,6 +141,9 @@ static void check_unsafe_path(const char *arg,
int arg_has_path)
{
const struct str_len_s *p;
+#ifndef __GLIBC__
+ const char *program_invocation_short_name = getprogname();
+#endif
for (p=unsafe_paths; p->str; p++) {
if (strncmp(path, p->str, p->len))
--
2.10.1 (Apple Git-78)
next reply other threads:[~2016-12-31 15:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-31 15:30 Marcin Chojnacki [this message]
2016-12-31 22:56 ` [Buildroot] [PATCH 1/1] toolchain/wrapper: fix building without glibc Baruch Siach
2017-01-25 21:31 ` 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=20161231153017.10545-1-marcinch7@gmail.com \
--to=marcinch7@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox