This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.27.9000-81-gdd1efd8


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  dd1efd8c56f6e54667d66b2302f9590736546414 (commit)
      from  13768813bcec803e4d269dc597411804bb4c37b1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dd1efd8c56f6e54667d66b2302f9590736546414

commit dd1efd8c56f6e54667d66b2302f9590736546414
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sat Feb 17 23:26:45 2018 +0100

    hurd: Fix build on missing __ptsname_internal function
    
    	* sysdeps/mach/hurd/ptsname.c: Include <sys/stat.h>.
    	(__ptsname_r): Move implementation to...
    	(__ptsname_internal): ... new function.  Add filling the STP
    	structure.

diff --git a/ChangeLog b/ChangeLog
index fdf0e46..4e8411f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,10 @@
 	* mach/Makefile (headers): Add mach/param.h.
 	* sysdeps/mach/hurd/bits/param.h: Include <mach/param.h>.
 	* sysdeps/mach/i386/mach/param.h: New file, defines EXEC_PAGESIZE
+	* sysdeps/mach/hurd/ptsname.c: Include <sys/stat.h>.
+	(__ptsname_r): Move implementation to...
+	(__ptsname_internal): ... new function.  Add filling the STP
+	structure.
 
 2018-02-17  John David Anglin  <danglin@gcc.gnu.org>
 
diff --git a/sysdeps/mach/hurd/ptsname.c b/sysdeps/mach/hurd/ptsname.c
index 08748a3..5c1dc6e 100644
--- a/sysdeps/mach/hurd/ptsname.c
+++ b/sysdeps/mach/hurd/ptsname.c
@@ -18,6 +18,7 @@
 
 #include <errno.h>
 #include <string.h>
+#include <sys/stat.h>
 #include <hurd.h>
 #include <hurd/fd.h>
 #include <hurd/term.h>
@@ -38,11 +39,9 @@ ptsname (int fd)
 }
 
 
-/* Store at most BUFLEN characters of the pathname of the slave pseudo
-   terminal associated with the master FD is open on in BUF.
-   Return 0 on success, otherwise an error number.  */
+/* We don't need STP, but fill it for conformity with the Linux version...  */
 int
-__ptsname_r (int fd, char *buf, size_t buflen)
+__ptsname_internal (int fd, char *buf, size_t buflen, struct stat64 *stp)
 {
   string_t peername;
   size_t len;
@@ -58,7 +57,23 @@ __ptsname_r (int fd, char *buf, size_t buflen)
       return ERANGE;
     }
 
+  if (stp)
+    {
+      if (__xstat64 (_STAT_VER, peername, stp) < 0)
+	return errno;
+    }
+
   memcpy (buf, peername, len);
   return 0;
 }
+
+
+/* Store at most BUFLEN characters of the pathname of the slave pseudo
+   terminal associated with the master FD is open on in BUF.
+   Return 0 on success, otherwise an error number.  */
+int
+__ptsname_r (int fd, char *buf, size_t buflen)
+{
+  return __ptsname_internal (fd, buf, buflen, NULL);
+}
 weak_alias (__ptsname_r, ptsname_r)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                   |    4 ++++
 sysdeps/mach/hurd/ptsname.c |   23 +++++++++++++++++++----
 2 files changed, 23 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]