diff options
author | James Meyer <james.meyer@operamail.com> | 2010-09-10 02:02:41 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2010-09-10 02:02:41 (GMT) |
commit | f2fbbf4a451664166f98f042e68edc146e9698fd (patch) | |
tree | c9aa8d9f084e1edb4cace55b340e8698c82b0c9e /abs/core-testing/coreutils/coreutils-uname.patch | |
parent | 29b4f1f1a35fbe81a50f8b96752c58eafc2f86a4 (diff) | |
parent | 6264aaba64f4165fd714220e10c4900401b85617 (diff) | |
download | linhes_pkgbuild-f2fbbf4a451664166f98f042e68edc146e9698fd.zip linhes_pkgbuild-f2fbbf4a451664166f98f042e68edc146e9698fd.tar.gz linhes_pkgbuild-f2fbbf4a451664166f98f042e68edc146e9698fd.tar.bz2 |
Merge branch 'HEAD' of ssh://jams@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Diffstat (limited to 'abs/core-testing/coreutils/coreutils-uname.patch')
-rw-r--r-- | abs/core-testing/coreutils/coreutils-uname.patch | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/abs/core-testing/coreutils/coreutils-uname.patch b/abs/core-testing/coreutils/coreutils-uname.patch index 93cb134..b458abe 100644 --- a/abs/core-testing/coreutils/coreutils-uname.patch +++ b/abs/core-testing/coreutils/coreutils-uname.patch @@ -11,11 +11,11 @@ func in the linux/arch/<ARCH>/ source tree of the kernel. --- coreutils/src/uname.c +++ coreutils/src/uname.c -@@ -51,6 +51,11 @@ +@@ -50,6 +50,11 @@ # include <mach-o/arch.h> #endif -+#if defined (__linux__) ++#if defined(__linux__) +# define USE_PROCINFO +# define UNAME_HARDWARE_PLATFORM +#endif @@ -63,7 +63,7 @@ func in the linux/arch/<ARCH>/ source tree of the kernel. + } +} + -+static int __linux_procinfo (int x, char *fstr, size_t s) ++static int __linux_procinfo(int x, char *fstr, size_t s) +{ + FILE *fp; + @@ -148,26 +148,26 @@ func in the linux/arch/<ARCH>/ source tree of the kernel. -#if HAVE_SYSINFO && defined SI_ARCHITECTURE +#if ( HAVE_SYSINFO && defined SI_ARCHITECTURE ) || defined(USE_PROCINFO) { - static char processor[257]; + static char processor[257]; +#if defined(USE_PROCINFO) -+ if (0 <= __linux_procinfo (PROCINFO_PROCESSOR, processor, sizeof processor)) ++ if (0 <= __linux_procinfo (PROCINFO_PROCESSOR, processor, sizeof processor)) +#else - if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor)) + if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor)) +#endif - element = processor; + element = processor; } #endif @@ -306,9 +404,13 @@ main (int argc, char **argv) if (element == unknown) - { - static char hardware_platform[257]; + { + static char hardware_platform[257]; +#if defined(USE_PROCINFO) -+ if (0 <= __linux_procinfo (PROCINFO_HARDWARE_PLATFORM, hardware_platform, sizeof hardware_platform)) ++ if (0 <= __linux_procinfo (PROCINFO_HARDWARE_PLATFORM, hardware_platform, sizeof hardware_platform)) +#else - size_t s = sizeof hardware_platform; - static int mib[] = { CTL_HW, UNAME_HARDWARE_PLATFORM }; - if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0) + size_t s = sizeof hardware_platform; + static int mib[] = { CTL_HW, UNAME_HARDWARE_PLATFORM }; + if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0) +#endif - element = hardware_platform; - } + element = hardware_platform; + } #endif |