]> git.proxmox.com Git - mirror_qemu.git/blobdiff - linux-user/uname.c
Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging
[mirror_qemu.git] / linux-user / uname.c
index fa5013e76cbe4d46d057733d4b10c90599b3a623..313b79dbad477a0f1e39595140f624b126c63323 100644 (file)
@@ -17,7 +17,7 @@
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdio.h>
+#include "qemu/osdep.h"
 
 #include "qemu.h"
 //#include "qemu-common.h"
@@ -52,9 +52,7 @@ const char *cpu_to_uname_machine(void *cpu_env)
     /* earliest emulated CPU is ARMv5TE; qemu can emulate the 1026, but not its
      * Jazelle support */
     return "armv5te" utsname_suffix;
-#elif defined(TARGET_X86_64)
-    return "x86-64";
-#elif defined(TARGET_I386)
+#elif defined(TARGET_I386) && !defined(TARGET_X86_64)
     /* see arch/x86/kernel/cpu/bugs.c: check_bugs(), 386, 486, 586, 686 */
     CPUState *cpu = ENV_GET_CPU((CPUX86State *)cpu_env);
     int family = object_property_get_int(OBJECT(cpu), "family", NULL);
@@ -155,7 +153,6 @@ void init_qemu_uname_release(void)
      * a specific fake version number, we might want to fake a minimum
      * target kernel version.
      */
-#ifdef UNAME_MINIMUM_RELEASE
     struct new_utsname buf;
 
     if (qemu_uname_release && *qemu_uname_release) {
@@ -169,5 +166,4 @@ void init_qemu_uname_release(void)
     if (relstr_to_int(buf.release) < relstr_to_int(UNAME_MINIMUM_RELEASE)) {
         qemu_uname_release = UNAME_MINIMUM_RELEASE;
     }
-#endif
 }