diff options
author | Baruch Siach <baruch@tkos.co.il> | 2017-09-08 12:12:57 +0300 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2017-09-08 10:42:52 +0000 |
commit | d45f27147f7d95eb209463dc03dc039ea3f15b59 (patch) | |
tree | 7de26c60152138aa422775998bc30bcad518fed8 | |
parent | 155fa1293ba0a54960d1959a2335d3917bf8bec6 (diff) | |
download | strace-d45f27147f7d95eb209463dc03dc039ea3f15b59.tar.gz |
error_prints: fix potential program_invocation_name type conflict
uClibc-ng declares program_invocation_name as const.
This causes the build failure below:
error_prints.c:40:14: error: conflicting types for ‘program_invocation_name’
extern char *program_invocation_name;
^~~~~~~~~~~~~~~~~~~~~~~
In file included from error_prints.c:32:0:
.../output/host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/errno.h:54:20: note: previous declaration of ‘program_invocation_name’ was here
extern const char *program_invocation_name, *program_invocation_short_name;
^~~~~~~~~~~~~~~~~~~~~~~
* error_prints.c (program_invocation_name): Declare only in case
of [!HAVE_PROGRAM_INVOCATION_NAME].
-rw-r--r-- | error_prints.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/error_prints.c b/error_prints.c index 8519b9246..710e99b04 100644 --- a/error_prints.c +++ b/error_prints.c @@ -37,7 +37,9 @@ #include "error_prints.h" +#ifndef HAVE_PROGRAM_INVOCATION_NAME extern char *program_invocation_name; +#endif static void verror_msg(int err_no, const char *fmt, va_list p) |