[PATCH] Define secure_getenv (v2)

H.J. Lu hjl.tools@gmail.com
Mon Aug 6 21:13:00 GMT 2012


On Mon, Aug 6, 2012 at 2:05 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> It failed on Linux/x32 since the earliest glibc for x32 is
>> 2.16.  If I understand it correctly, GLIBC_2_16 in
>>
>> #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_16)
>> compat_symbol (libc, __libc_secure_getenv, __secure_getenv, GLIBC_2_0);
>> #endif
>>
>> should be GLIBC_2_17.
>
> Yes, sorry we didn't catch that.  The second version parameter in
> SHLIB_COMPAT is the first version that did not intend to expose the old
> symbol for application use, not the last one that did.
>

I am testing this patch on x32.  OK to install if it works?

Thanks.

-- 
H.J.
diff --git a/stdlib/secure-getenv.c b/stdlib/secure-getenv.c
index 2e696e9..7634fae 100644
--- a/stdlib/secure-getenv.c
+++ b/stdlib/secure-getenv.c
@@ -32,6 +32,6 @@ __libc_secure_getenv (name)
 weak_alias (__libc_secure_getenv, secure_getenv)
 libc_hidden_weak (__libc_secure_getenv)

-#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_16)
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_17)
 compat_symbol (libc, __libc_secure_getenv, __secure_getenv, GLIBC_2_0);
 #endif



More information about the Libc-alpha mailing list