diff options
| author | Carmelo Amoroso <carmelo.amoroso@st.com> | 2007-11-22 18:26:26 +0000 |
|---|---|---|
| committer | Carmelo Amoroso <carmelo.amoroso@st.com> | 2007-11-22 18:26:26 +0000 |
| commit | 6b8ce6b0d1ad6f54aadacc3f2fc0de5646cc96d4 (patch) | |
| tree | b27377211dcc21e62c7bb6d23f4686e81d0df2f5 /libc/misc/internals/__uClibc_main.c | |
| parent | c87a877bf9ac272cb879d506b791a90db6471195 (diff) | |
| download | uClibc-alpine-6b8ce6b0d1ad6f54aadacc3f2fc0de5646cc96d4.tar.bz2 uClibc-alpine-6b8ce6b0d1ad6f54aadacc3f2fc0de5646cc96d4.tar.xz | |
Fix __uClibc_main.c to not create aliases to hidden variables
(like __progname). This patch has been already into the trunk
and it solves a segfault with openssh for example.
Further needed to fix the prototype of 'program_invocation_name;
into include/errno.h to avoid mismatch with definition within
libc/misc/internals/__uCLibc_main.c
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libc/misc/internals/__uClibc_main.c')
| -rw-r--r-- | libc/misc/internals/__uClibc_main.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c index 15544790a..701e9efbf 100644 --- a/libc/misc/internals/__uClibc_main.c +++ b/libc/misc/internals/__uClibc_main.c @@ -122,14 +122,14 @@ extern void (*__fini_array_end []) (void) attribute_hidden; # endif #endif -attribute_hidden const char *__uclibc_progname = NULL; -#ifdef __UCLIBC_HAS___PROGNAME__ -strong_alias (__uclibc_progname, __progname) -#endif +attribute_hidden const char *__uclibc_progname = ""; #ifdef __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__ -attribute_hidden const char *__progname_full = NULL; -strong_alias (__uclibc_progname, program_invocation_short_name) -strong_alias (__progname_full, program_invocation_name) +const char *program_invocation_short_name = ""; +const char *program_invocation_name = ""; +#endif +#ifdef __UCLIBC_HAS___PROGNAME__ +weak_alias (program_invocation_short_name, __progname) +weak_alias (program_invocation_name, __progname_full) #endif /* @@ -138,7 +138,7 @@ strong_alias (__progname_full, program_invocation_name) */ char **__environ = 0; -weak_alias(__environ,environ) +weak_alias(__environ, environ) /* TODO: don't export __pagesize; we cant now because libpthread uses it */ size_t __pagesize = 0; |
