From 5f62394167f5df4565e6e07e1e16c56021626e50 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 27 Aug 1998 20:42:04 +0000 Subject: Update. Call _dl_new_object with extra argument. Call _dl_new_object with extra argument. but the main one if new argument is nonzero. * elf/ldsodefs.h: Adjust for _dl_new_object change. (dl_main): Call _dl_new_object with extra argument. --- sysdeps/unix/sysv/linux/dl-origin.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sysdeps/unix/sysv') diff --git a/sysdeps/unix/sysv/linux/dl-origin.h b/sysdeps/unix/sysv/linux/dl-origin.h index eef067814a..7f7d86c404 100644 --- a/sysdeps/unix/sysv/linux/dl-origin.h +++ b/sysdeps/unix/sysv/linux/dl-origin.h @@ -30,15 +30,15 @@ get_origin (void) char *result; if (readlink ("/proc/self/exe", linkval, PATH_MAX) != -1 - && result[0] != '[') + && linkval[0] != '[') { /* We can use this value. */ char *last_slash = strrchr (linkval, '/'); - result = (char *) malloc (linkval - last_slash + 1); + result = (char *) malloc (last_slash - linkval + 1); if (result == NULL) result = (char *) -1; else - *((char *) __mempcpy (result, linkval, linkval - last_slash)) = '\0'; + *((char *) __mempcpy (result, linkval, last_slash - linkval)) = '\0'; } else { -- cgit 1.4.1