]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hurd: Fix linknamespace of spawni
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Wed, 5 Dec 2018 22:24:03 +0000 (23:24 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Fri, 7 Dec 2018 19:21:45 +0000 (20:21 +0100)
* include/unistd.h (__confstr): Add prototype and hidden prototype.
* posix/confstr.c (confstr): Rename to __confstr.
(__confstr): Add hidden def.
(confstr): Add weak alias for __confstr.
* sysdeps/mach/hurd/spawni.c (__spawni): Call __confstr instead of
confstr.

ChangeLog
include/unistd.h
posix/confstr.c
sysdeps/mach/hurd/spawni.c

index 616e3705e14d2a80c2b6c98d9f93e485b5fbccf7..998f4c153f3c674e62511719d44736d2e0ef1de7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2018-12-05  Samuel Thibault  <samuel.thibault@ens-lyon.org>
+
+       * include/unistd.h (__confstr): Add prototype and hidden prototype.
+       * posix/confstr.c (confstr): Rename to __confstr.
+       (__confstr): Add hidden def.
+       (confstr): Add weak alias for __confstr.
+       * sysdeps/mach/hurd/spawni.c (__spawni): Call __confstr instead of
+       confstr.
+
 2018-12-07  H.J. Lu  <hongjiu.lu@intel.com>
 
        * NEWS: Mention getcpu.
index a171b0032648b4ba82de8a07e45a247f91bf49f3..a043431ecfb28a1ee3e3eae30ca04760afd32950 100644 (file)
@@ -6,6 +6,8 @@
 libc_hidden_proto (_exit, __noreturn__)
 rtld_hidden_proto (_exit, __noreturn__)
 libc_hidden_proto (alarm)
+extern size_t __confstr (int name, char *buf, size_t len);
+libc_hidden_proto (__confstr)
 libc_hidden_proto (confstr)
 libc_hidden_proto (execl)
 libc_hidden_proto (execle)
index de4cff76cc8112bbb1c7e859107b9c6b9fb49581..73ebb2e254bc0dc014874aa88ac1920d70ea52bb 100644 (file)
@@ -29,7 +29,7 @@
    of BUF with the value corresponding to NAME and zero-terminate BUF.
    Return the number of bytes required to hold NAME's entire value.  */
 size_t
-confstr (int name, char *buf, size_t len)
+__confstr (int name, char *buf, size_t len)
 {
   const char *string = "";
   size_t string_len = 1;
@@ -289,4 +289,6 @@ confstr (int name, char *buf, size_t len)
     }
   return string_len;
 }
+libc_hidden_def (__confstr)
 libc_hidden_def (confstr)
+weak_alias (__confstr, confstr)
index 16c927be24ccc019d24480f087f7187cce08e3f7..e31b21ceeac1dc72aa2e461e0f87ee9ca9e62ab6 100644 (file)
@@ -673,10 +673,10 @@ __spawni (pid_t *pid, const char *file,
          /* There is no `PATH' in the environment.
             The default search path is the current directory
             followed by the path `confstr' returns for `_CS_PATH'.  */
-         len = confstr (_CS_PATH, (char *) NULL, 0);
+         len = __confstr (_CS_PATH, (char *) NULL, 0);
          path = (char *) __alloca (1 + len);
          path[0] = ':';
-         (void) confstr (_CS_PATH, path + 1, len);
+         (void) __confstr (_CS_PATH, path + 1, len);
        }
 
       len = strlen (file) + 1;