[newlib-cygwin] Cygwin: proc: fix /proc/version output after uname change

Corinna Vinschen corinna@sourceware.org
Mon Mar 18 10:34:00 GMT 2019


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=38322b9bf64bcdee8025edbaacf93a6ba9559b5e

commit 38322b9bf64bcdee8025edbaacf93a6ba9559b5e
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Mon Mar 18 11:34:00 2019 +0100

    Cygwin: proc: fix /proc/version output after uname change
    
    3.0.0 changed uname but missed to align /proc/version
    which then used the old uname function on the new uname
    struct.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/fhandler_proc.cc |  4 +++-
 winsup/cygwin/release/3.0.5    | 13 +++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc
index cda2f72..a6a0b68 100644
--- a/winsup/cygwin/fhandler_proc.cc
+++ b/winsup/cygwin/fhandler_proc.cc
@@ -405,6 +405,8 @@ fhandler_proc::fill_filebuf ()
   return false;
 }
 
+extern "C" int uname_x (struct utsname *);
+
 static off_t
 format_proc_version (void *, char *&destbuf)
 {
@@ -413,7 +415,7 @@ format_proc_version (void *, char *&destbuf)
   char *bufptr = buf;
   struct utsname uts_name;
 
-  uname (&uts_name);
+  uname_x (&uts_name);
   bufptr += __small_sprintf (bufptr, "%s version %s (%s@%s) (%s) %s\n",
 			  uts_name.sysname, uts_name.release, USERNAME, HOSTNAME,
 			  GCC_VERSION, uts_name.version);
diff --git a/winsup/cygwin/release/3.0.5 b/winsup/cygwin/release/3.0.5
new file mode 100644
index 0000000..62c8cf5
--- /dev/null
+++ b/winsup/cygwin/release/3.0.5
@@ -0,0 +1,13 @@
+What's new:
+-----------
+
+
+What changed:
+-------------
+
+
+Bug Fixes
+---------
+
+- Fix /proc/version after uname change
+  Addresses: https://cygwin.com/ml/cygwin/2019-03/msg00467.html



More information about the Cygwin-cvs mailing list