Author: matthew Date: 2010-05-17 16:41:24 -0600 (Mon, 17 May 2010) New Revision: 2197
Added: trunk/coreutils/coreutils-8.5-uname-2.patch Log: Add Fedora-based uname patch for Coreutils. Added: trunk/coreutils/coreutils-8.5-uname-2.patch =================================================================== --- trunk/coreutils/coreutils-8.5-uname-2.patch (rev 0) +++ trunk/coreutils/coreutils-8.5-uname-2.patch 2010-05-17 22:41:24 UTC (rev 2197) @@ -0,0 +1,55 @@ +Submitted by: William Immendorf <[email protected]> +Date: 2010-05-08 +Inital Package Version: 8.5 +Origin: http://cvs.fedoraproject.org/viewvc/devel/coreutils/coreutils-8.2-uname-processortype.patch +Upstream Status: Rejected +Description: Fixes the output of uname's -i and -p parameters + +diff -Naur coreutils-8.5.orig/src/uname.c coreutils-8.5/src/uname.c +--- coreutils-8.5.orig/src/uname.c 2010-05-08 11:50:59.153186845 -0500 ++++ coreutils-8.5/src/uname.c 2010-05-08 11:51:14.254062912 -0500 +@@ -301,13 +301,19 @@ + + if (toprint & PRINT_PROCESSOR) + { +- char const *element = unknown; ++ char *element = unknown; + #if HAVE_SYSINFO && defined SI_ARCHITECTURE + { + static char processor[257]; + if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor)) + element = processor; + } ++#else ++ { ++ struct utsname u; ++ uname(&u); ++ element = u.machine; ++ } + #endif + #ifdef UNAME_PROCESSOR + if (element == unknown) +@@ -345,7 +351,7 @@ + + if (toprint & PRINT_HARDWARE_PLATFORM) + { +- char const *element = unknown; ++ char *element = unknown; + #if HAVE_SYSINFO && defined SI_PLATFORM + { + static char hardware_platform[257]; +@@ -353,6 +359,14 @@ + hardware_platform, sizeof hardware_platform)) + element = hardware_platform; + } ++#else ++ { ++ struct utsname u; ++ uname(&u); ++ element = u.machine; ++ if(strlen(element)==4 && element[0]=='i' && element[2]=='8' && element[3]=='6') ++ element[1]='3'; ++ } + #endif + #ifdef UNAME_HARDWARE_PLATFORM + if (element == unknown) -- http://linuxfromscratch.org/mailman/listinfo/patches FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
