Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Aug 2006 19:56:05 +0200 (CEST)
From:      Juergen Lock <nox@jelal.kn-bremen.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/102154: fix emulators/qemu build on 4
Message-ID:  <200608161756.k7GHu5JZ013505@saturn.kn-bremen.de>
Resent-Message-ID: <200608161800.k7GI0X0J096250@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         102154
>Category:       ports
>Synopsis:       fix emulators/qemu build on 4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 16 18:00:32 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Juergen Lock
>Release:        FreeBSD 6.1-RELEASE-p1 i386
>Organization:
me?  organized??
>Environment:
System: FreeBSD saturn 6.1-RELEASE-p1 FreeBSD 6.1-RELEASE-p1 #2: Fri Jun 23 23:45:09 CEST 2006 nox@saturn:/ad4/usr/home/nox/src61/src/sys/i386/compile/GENERICu i386


>Description:
	fix build on 4
>How-To-Repeat:
	http://pointyhat.freebsd.org/errorlogs/i386-errorlogs/e.4.2006071303/qemu-0.8.2.log
>Fix:

New file: files/patch-PRId64

Index: files/patch-be
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/files/patch-be,v
retrieving revision 1.3
diff -u -r1.3 patch-be
--- files/patch-be	7 Aug 2006 16:10:27 -0000	1.3
+++ files/patch-be	16 Aug 2006 17:37:53 -0000
@@ -16,7 +16,7 @@
  {
      use_rt_clock = 0;
 -#if defined(__linux__)
-+#if defined(__linux__) || defined(__FreeBSD__)
++#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
      {
          struct timespec ts;
          if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) {
@@ -25,7 +25,7 @@
  static int64_t get_clock(void)
  {
 -#if defined(__linux__)
-+#if defined(__linux__) || defined(__FreeBSD__)
++#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
      if (use_rt_clock) {
          struct timespec ts;
          clock_gettime(CLOCK_MONOTONIC, &ts);
Index: files/patch-PRId64
@@ -0,0 +1,113 @@
+Index: qemu/vl.h
+@@ -30,6 +30,12 @@
+ #include <stdarg.h>
+ #include <string.h>
+ #include <inttypes.h>
++#ifndef PRId64
++#define	PRId64	"lld"	/* int64_t */
++#define	PRIo64	"llo"	/* int64_t */
++#define	PRIx64	"llx"	/* int64_t */
++#define	PRIu64	"llu"	/* int64_t */
++#endif
+ #include <limits.h>
+ #include <time.h>
+ #include <ctype.h>
+Index: qemu/dis-asm.h
+@@ -13,6 +13,12 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <inttypes.h>
++#ifndef PRId64
++#define	PRId64	"lld"	/* int64_t */
++#define	PRIo64	"llo"	/* int64_t */
++#define	PRIx64	"llx"	/* int64_t */
++#define	PRIu64	"llu"	/* int64_t */
++#endif
+ 
+ #define PARAMS(x) x
+ typedef void *PTR;
+Index: qemu/kqemu.c
+@@ -33,6 +33,12 @@
+ #include <errno.h>
+ #include <unistd.h>
+ #include <inttypes.h>
++#ifndef PRId64
++#define	PRId64	"lld"	/* int64_t */
++#define	PRIo64	"llo"	/* int64_t */
++#define	PRIx64	"llx"	/* int64_t */
++#define	PRIu64	"llu"	/* int64_t */
++#endif
+ 
+ #include "cpu.h"
+ #include "exec-all.h"
+Index: qemu/translate-all.c
+@@ -22,6 +22,12 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <inttypes.h>
++#ifndef PRId64
++#define	PRId64	"lld"	/* int64_t */
++#define	PRIo64	"llo"	/* int64_t */
++#define	PRIx64	"llx"	/* int64_t */
++#define	PRIu64	"llu"	/* int64_t */
++#endif
+ 
+ #include "config.h"
+ 
+Index: qemu/target-i386/helper.c
+@@ -21,6 +21,13 @@
+ 
+ //#define DEBUG_PCALL
+ 
++#ifndef PRId64
++#define	PRId64	"lld"	/* int64_t */
++#define	PRIo64	"llo"	/* int64_t */
++#define	PRIx64	"llx"	/* int64_t */
++#define	PRIu64	"llu"	/* int64_t */
++#endif
++
+ #if 0
+ #define raise_exception_err(a, b)\
+ do {\
+Index: qemu/target-i386/helper2.c
+@@ -22,6 +22,12 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <inttypes.h>
++#ifndef PRId64
++#define	PRId64	"lld"	/* int64_t */
++#define	PRIo64	"llo"	/* int64_t */
++#define	PRIx64	"llx"	/* int64_t */
++#define	PRIu64	"llu"	/* int64_t */
++#endif
+ #include <signal.h>
+ #include <assert.h>
+ 
+Index: qemu/target-ppc/translate.c
+@@ -22,6 +22,12 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <inttypes.h>
++#ifndef PRId64
++#define	PRId64	"lld"	/* int64_t */
++#define	PRIo64	"llo"	/* int64_t */
++#define	PRIx64	"llx"	/* int64_t */
++#define	PRIu64	"llu"	/* int64_t */
++#endif
+ 
+ #include "cpu.h"
+ #include "exec-all.h"
+Index: qemu/target-sparc/helper.c
+@@ -22,6 +22,12 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <inttypes.h>
++#ifndef PRId64
++#define	PRId64	"lld"	/* int64_t */
++#define	PRIo64	"llo"	/* int64_t */
++#define	PRIx64	"llx"	/* int64_t */
++#define	PRIu64	"llu"	/* int64_t */
++#endif
+ #include <signal.h>
+ #include <assert.h>
+ 
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608161756.k7GHu5JZ013505>