about summary refs log tree commit diff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-05-19 18:46:36 -0700
committerH.J. Lu <hjl.tools@gmail.com>2024-05-20 05:22:43 -0700
commit7935e7a537cd3347b922dc9f24a2b722dd80156c (patch)
treea94201c3be3aef695fac4b8a2d2a0951609cc2ca
parent4e21cb95e206dddf049dec12f7d4e25a79d60e05 (diff)
downloadglibc-7935e7a537cd3347b922dc9f24a2b722dd80156c.tar.gz
glibc-7935e7a537cd3347b922dc9f24a2b722dd80156c.tar.xz
glibc-7935e7a537cd3347b922dc9f24a2b722dd80156c.zip
Rename procutils_read_file to __libc_procutils_read_file [BZ #31755]
Fix BZ #31755 by renaming the internal function procutils_read_file to
__libc_procutils_read_file.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
-rw-r--r--sysdeps/unix/sysv/linux/pidfd_getpid.c2
-rw-r--r--sysdeps/unix/sysv/linux/procutils.c5
-rw-r--r--sysdeps/unix/sysv/linux/procutils.h5
3 files changed, 7 insertions, 5 deletions
diff --git a/sysdeps/unix/sysv/linux/pidfd_getpid.c b/sysdeps/unix/sysv/linux/pidfd_getpid.c
index 8567b413dd..ebcbe8fdf6 100644
--- a/sysdeps/unix/sysv/linux/pidfd_getpid.c
+++ b/sysdeps/unix/sysv/linux/pidfd_getpid.c
@@ -105,7 +105,7 @@ pidfd_getpid (int fd)
   *_fitoa_word (fd, p, 10, 0) = '\0';
 
   struct parse_fdinfo_t fdinfo = { .found = false, .pid = -1 };
-  if (!procutils_read_file (fdinfoname, parse_fdinfo, &fdinfo))
+  if (!__libc_procutils_read_file (fdinfoname, parse_fdinfo, &fdinfo))
     /* The fdinfo contains an invalid 'Pid:' value.  */
     return INLINE_SYSCALL_ERROR_RETURN_VALUE (EBADF);
 
diff --git a/sysdeps/unix/sysv/linux/procutils.c b/sysdeps/unix/sysv/linux/procutils.c
index 25666ec0cb..86d3d37329 100644
--- a/sysdeps/unix/sysv/linux/procutils.c
+++ b/sysdeps/unix/sysv/linux/procutils.c
@@ -71,8 +71,9 @@ next_line (char **r, int fd, char *const buffer, char **cp, char **re,
 }
 
 bool
-procutils_read_file (const char *filename, procutils_closure_t closure,
-		     void *arg)
+__libc_procutils_read_file (const char *filename,
+			    procutils_closure_t closure,
+			    void *arg)
 {
   enum { buffer_size = PROCUTILS_MAX_LINE_LEN };
   char buffer[buffer_size];
diff --git a/sysdeps/unix/sysv/linux/procutils.h b/sysdeps/unix/sysv/linux/procutils.h
index 73ef3e5f5b..acf1ec587a 100644
--- a/sysdeps/unix/sysv/linux/procutils.h
+++ b/sysdeps/unix/sysv/linux/procutils.h
@@ -37,7 +37,8 @@ typedef int (*procutils_closure_t) (const char *line, void *arg);
 
    It returns true in case the file is fully read or false if CLOSURE
    returns a value diferent than 0.  */
-bool procutils_read_file (const char *filename, procutils_closure_t closure,
-			  void *arg) attribute_hidden;
+bool __libc_procutils_read_file (const char *filename,
+				 procutils_closure_t closure,
+				 void *arg) attribute_hidden;
 
 #endif