X-Git-Url: https://git.tld-linux.org/?p=packages%2Fcoreutils.git;a=blobdiff_plain;f=coreutils-uname-cpuinfo.patch;h=b6b83c03383d50e02ebdcd42e335a61cf1e244fe;hp=853be2b0d90d05e82d0ee8123bb5232d146845b9;hb=HEAD;hpb=c15795f273c4569d3441eb7522d227bd518f0c58 diff --git a/coreutils-uname-cpuinfo.patch b/coreutils-uname-cpuinfo.patch index 853be2b..c882d59 100644 --- a/coreutils-uname-cpuinfo.patch +++ b/coreutils-uname-cpuinfo.patch @@ -1,7 +1,7 @@ -diff -urN coreutils-5.2.1-orig/src/uname.c coreutils-5.2.1/src/uname.c ---- coreutils-5.2.1-orig/src/uname.c 2005-01-15 19:15:36.193346304 +0100 -+++ coreutils-5.2.1/src/uname.c 2005-01-15 19:19:06.918311240 +0100 -@@ -77,6 +77,8 @@ +diff -urNp -x '*.orig' coreutils-8.32.org/src/uname.c coreutils-8.32/src/uname.c +--- coreutils-8.32.org/src/uname.c 2020-02-04 20:27:08.000000000 +0100 ++++ coreutils-8.32/src/uname.c 2021-03-21 00:28:54.006899186 +0100 +@@ -86,6 +86,8 @@ /* Operating system. */ #define PRINT_OPERATING_SYSTEM 128 @@ -9,27 +9,28 @@ diff -urN coreutils-5.2.1-orig/src/uname.c coreutils-5.2.1/src/uname.c + static struct option const uname_long_options[] = { - {"all", no_argument, NULL, 'a'}, -@@ -243,13 +245,9 @@ - if (toprint & PRINT_PROCESSOR) - { - char const *element = unknown; + {"all", no_argument, nullptr, 'a'}, +@@ -323,14 +323,12 @@ + element = "powerpc"; + # endif + #endif -#if HAVE_SYSINFO && defined SI_ARCHITECTURE -- { -- static char processor[257]; -- if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor)) -- element = processor; -- } + if (element == unknown) + { +- static char processor[257]; +- if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor)) +- element = processor; ++ char processor[BUFSIZ]; ++ __sysinfo_processor_type(processor); ++ element = processor; + } -#endif -+ char processor[BUFSIZ]; -+ __sysinfo_processor_type(processor); -+ element = processor; #ifdef UNAME_PROCESSOR if (element == unknown) - { -@@ -294,3 +292,38 @@ + { +@@ -374,3 +372,38 @@ main (int argc, char **argv) - exit (EXIT_SUCCESS); + return EXIT_SUCCESS; } + +