Changeset e92465d for patches/coreutils-7.6-uname-1.patch
- Timestamp:
- Sep 13, 2009, 8:25:05 PM (15 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- 0a81d23
- Parents:
- dca5b7b (diff), 32cb8ca (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
patches/coreutils-7.6-uname-1.patch
rdca5b7b re92465d 1 1 Submitted By: Jim Gifford <jim at cross-lfs dot org> 2 Date: 2009-0 2-213 Initial Package Version: 7. 12 Date: 2009-09-12 3 Initial Package Version: 7.6 4 4 Upstream Status: Not Accepted 5 5 Origin: Gentoo - http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/coreutils … … 7 7 8 8 Rediffed for 7.1 by Jim Gifford 9 Original Patch by - Matthew Burgess and Scot McPherson 9 Rediffed for 7.5 by Jim Gifford 10 10 11 diff -Naur coreutils-7. 1.orig/src/uname.c coreutils-7.1/src/uname.c12 --- coreutils-7. 1.orig/src/uname.c 2008-09-18 00:06:57.000000000 -070013 +++ coreutils-7. 1/src/uname.c 2009-02-21 21:48:22.417139823 -080011 diff -Naur coreutils-7.6.orig/src/uname.c coreutils-7.6/src/uname.c 12 --- coreutils-7.6.orig/src/uname.c 2009-09-01 04:01:16.000000000 -0700 13 +++ coreutils-7.6/src/uname.c 2009-09-12 01:32:54.000000000 -0700 14 14 @@ -50,6 +50,11 @@ 15 15 # include <mach-o/arch.h> … … 149 149 +#if ( HAVE_SYSINFO && defined SI_ARCHITECTURE ) || defined(USE_PROCINFO) 150 150 { 151 151 static char processor[257]; 152 152 +#if defined(USE_PROCINFO) 153 + 153 + if (0 <= __linux_procinfo (PROCINFO_PROCESSOR, processor, sizeof processor)) 154 154 +#else 155 155 if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor)) 156 156 +#endif 157 157 element = processor; 158 158 } 159 159 #endif 160 160 @@ -358,9 +478,13 @@ 161 161 if (element == unknown) 162 163 162 { 163 static char hardware_platform[257]; 164 164 +#if defined(USE_PROCINFO) 165 + 165 + if (0 <= __linux_procinfo (PROCINFO_HARDWARE_PLATFORM, hardware_platform, sizeof hardware_platform)) 166 166 +#else 167 168 169 167 size_t s = sizeof hardware_platform; 168 static int mib[] = { CTL_HW, UNAME_HARDWARE_PLATFORM }; 169 if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0) 170 170 +#endif 171 172 171 element = hardware_platform; 172 } 173 173 #endif
Note:
See TracChangeset
for help on using the changeset viewer.