aboutsummaryrefslogtreecommitdiff
path: root/nss/getXXbyYY_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'nss/getXXbyYY_r.c')
-rw-r--r--nss/getXXbyYY_r.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c
index ac10f4e..a54ae67 100644
--- a/nss/getXXbyYY_r.c
+++ b/nss/getXXbyYY_r.c
@@ -208,5 +208,32 @@ done:
return status == NSS_STATUS_SUCCESS ? 0 : errno;
}
+#if defined SHARED && DO_VERSIONING
+#define OLD(name) OLD1 (name)
+#define OLD1(name) __old_##name
+
+int
+OLD (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
+ size_t buflen, LOOKUP_TYPE **result H_ERRNO_PARM)
+{
+ int ret = INTERNAL (REENTRANT_NAME) (ADD_VARIABLES, resbuf, buffer,
+ buflen, result H_ERRNO_VAR);
+
+ if (ret != 0)
+ ret = -1;
+
+ return ret;
+}
+
+#define do_symbol_version(real, name, version) \
+ symbol_version(real, name, version)
+do_symbol_version(OLD (REENTRANT_NAME), REENTRANT_NAME, GLIBC_2.0);
+
+#define do_default_symbol_version(real, name, version) \
+ default_symbol_version(real, name, version)
+do_default_symbol_version(INTERNAL (REENTRANT_NAME), REENTRANT_NAME,
+ GLIBC_2.1.2);
+#else
#define do_weak_alias(n1, n2) weak_alias (n1, (n2))
do_weak_alias (INTERNAL (REENTRANT_NAME), REENTRANT_NAME)
+#endif