Projects
Mega:23.09
coreutils
_service:tar_scm:coreutils-8.2-uname-processort...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:coreutils-8.2-uname-processortype.patch of Package coreutils
diff --git a/src/uname.c b/src/uname.c index 921a881..512655d 100644 --- a/src/uname.c +++ b/src/uname.c @@ -313,7 +313,7 @@ main (int argc, char **argv) if (toprint & PRINT_PROCESSOR) { - char const *element = unknown; + char *element = unknown; #ifdef __APPLE__ # if defined __arm__ || defined __arm64__ element = "arm"; @@ -330,6 +330,12 @@ main (int argc, char **argv) if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor)) element = processor; } +#else + { + static struct utsname u; + uname(&u); + element = u.machine; + } #endif #ifdef UNAME_PROCESSOR if (element == unknown) @@ -347,7 +353,7 @@ main (int argc, char **argv) if (toprint & PRINT_HARDWARE_PLATFORM) { - char const *element = unknown; + char *element = unknown; #if HAVE_SYSINFO && defined SI_PLATFORM { static char hardware_platform[257]; @@ -355,6 +361,14 @@ main (int argc, char **argv) hardware_platform, sizeof hardware_platform)) element = hardware_platform; } +#else + { + static 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)
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2