Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jun 2004 20:57:02 +0200 (CEST)
From:      Juergen Lock <nox@jelal.kn-bremen.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/68349: unbreak emulators/qemu for -stable, add ONLY_FOR_ARCHS
Message-ID:  <200406251857.i5PIv2F78572@saturn.kn-bremen.de>
Resent-Message-ID: <200406260010.i5Q0AKT4044279@freefall.freebsd.org>

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

>Number:         68349
>Category:       ports
>Synopsis:       unbreak emulators/qemu for -stable, add ONLY_FOR_ARCHS
>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:   Sat Jun 26 00:10:19 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Juergen Lock
>Release:        FreeBSD 5.2.1-SECURITY i386
>Organization:
me?  organized??
>Environment:
System: FreeBSD neptun 5.2.1-SECURITY FreeBSD 5.2.1-SECURITY #0: Wed May 26 04:19:54 GMT 2004     root@builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386


>Description:

	forgot an #ifdef DIOCGMEDIASIZE, add
ONLY_FOR_ARCHS=	i386 amd64 powerpc

>How-To-Repeat:
	
>Fix:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- Makefile	25 Jun 2004 07:37:31 -0000	1.10
+++ Makefile	25 Jun 2004 18:07:50 -0000
@@ -27,6 +27,7 @@
 PATCH_STRIP=	-p1
 CONFIGURE_ARGS+=	--prefix=${PREFIX} --cc=${CC}\ -I${PREFIX}/include
 MAN1=		qemu.1 qemu-mkcow.1
+ONLY_FOR_ARCHS=	i386 amd64 powerpc
 
 post-install:
 	@${CAT} ${PKGMESSAGE}
Index: files/patch-bg
===================================================================
RCS file: /home/ncvs/ports/emulators/qemu/files/patch-bg,v
retrieving revision 1.1
diff -u -r1.1 patch-bg
--- files/patch-bg	25 Jun 2004 07:37:31 -0000	1.1
+++ files/patch-bg	25 Jun 2004 16:35:28 -0000
@@ -8,27 +8,30 @@
  #include <stdlib.h>
  #include <stdio.h>
  #include <stdarg.h>
-@@ -36,6 +38,12 @@
+@@ -36,6 +38,13 @@
  #include <sys/stat.h>
  #include <netinet/in.h>
  
 +#ifdef _BSD
 +#include <sys/types.h>
 +#include <sys/ioctl.h>
++#include <sys/queue.h>
 +#include <sys/disk.h>
 +#endif
 +
  #include "cow.h"
  
  #include "bswap.h"
-@@ -56,6 +64,13 @@ int cow_create(int cow_fd, const char *i
+@@ -56,6 +64,15 @@ int cow_create(int cow_fd, const char *i
              perror(image_filename);
              exit(1);
          }
 +#ifdef _BSD
 +        struct stat sb;
 +        if (!fstat(fd,&sb) && (S_IFCHR & sb.st_mode)) {
++#ifdef DIOCGMEDIASIZE
 +            if (ioctl(fd, DIOCGMEDIASIZE, (off_t *)&image_sectors))
++#endif
 +                image_sectors = lseek(fd, 0LL, SEEK_END);
 +        } else
 +#endif                      
>Release-Note:
>Audit-Trail:
>Unformatted:



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