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>
This commit is contained in:
Corinna Vinschen 2019-03-18 11:34:00 +01:00
parent df960cb954
commit 38322b9bf6
2 changed files with 16 additions and 1 deletions

View File

@ -405,6 +405,8 @@ fhandler_proc::fill_filebuf ()
return false; return false;
} }
extern "C" int uname_x (struct utsname *);
static off_t static off_t
format_proc_version (void *, char *&destbuf) format_proc_version (void *, char *&destbuf)
{ {
@ -413,7 +415,7 @@ format_proc_version (void *, char *&destbuf)
char *bufptr = buf; char *bufptr = buf;
struct utsname uts_name; struct utsname uts_name;
uname (&uts_name); uname_x (&uts_name);
bufptr += __small_sprintf (bufptr, "%s version %s (%s@%s) (%s) %s\n", bufptr += __small_sprintf (bufptr, "%s version %s (%s@%s) (%s) %s\n",
uts_name.sysname, uts_name.release, USERNAME, HOSTNAME, uts_name.sysname, uts_name.release, USERNAME, HOSTNAME,
GCC_VERSION, uts_name.version); GCC_VERSION, uts_name.version);

View File

@ -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