variable u should be static in uname processor type patch

This commit is contained in:
Ondřej Vašík 2011-08-18 17:58:14 +02:00
parent 4afb5b057d
commit 9938e5be66
2 changed files with 6 additions and 3 deletions

View File

@ -16,7 +16,7 @@ diff -urNp coreutils-8.2-orig/src/uname.c coreutils-8.2/src/uname.c
} }
+#else +#else
+ { + {
+ struct utsname u; + static struct utsname u;
+ uname(&u); + uname(&u);
+ element = u.machine; + element = u.machine;
+ } + }
@ -38,7 +38,7 @@ diff -urNp coreutils-8.2-orig/src/uname.c coreutils-8.2/src/uname.c
} }
+#else +#else
+ { + {
+ struct utsname u; + static struct utsname u;
+ uname(&u); + uname(&u);
+ element = u.machine; + element = u.machine;
+ if(strlen(element)==4 && element[0]=='i' && element[2]=='8' && element[3]=='6') + if(strlen(element)==4 && element[0]=='i' && element[2]=='8' && element[3]=='6')

View File

@ -1,7 +1,7 @@
Summary: A set of basic GNU tools commonly used in shell scripts Summary: A set of basic GNU tools commonly used in shell scripts
Name: coreutils Name: coreutils
Version: 8.12 Version: 8.12
Release: 4%{?dist} Release: 5%{?dist}
License: GPLv3+ License: GPLv3+
Group: System Environment/Base Group: System Environment/Base
Url: http://www.gnu.org/software/coreutils/ Url: http://www.gnu.org/software/coreutils/
@ -335,6 +335,9 @@ fi
%{_libdir}/coreutils %{_libdir}/coreutils
%changelog %changelog
* Thu Aug 18 2011 Ondrej Vasik <ovasik@redhat.com> - 8.12-5
- variable "u" should be static in uname processor type patch
* Thu Aug 11 2011 Ondrej Vasik <ovasik@redhat.com> - 8.12-4 * Thu Aug 11 2011 Ondrej Vasik <ovasik@redhat.com> - 8.12-4
- deprecate non-upstream cp -Z/--context (install should be - deprecate non-upstream cp -Z/--context (install should be
used instead of it), make it working if destination exists used instead of it), make it working if destination exists