aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authorkrion <krion@FreeBSD.org>2004-06-26 13:21:59 +0800
committerkrion <krion@FreeBSD.org>2004-06-26 13:21:59 +0800
commit92e09b206af69b6d0ca7ff7043268956c269d5ec (patch)
tree095dd0b7e8fde05ba8ca8937fc0b0efb87b8a8c3 /emulators
parent7ede2e8f741927c0e48f06d203d5931cdaa89ef8 (diff)
downloadfreebsd-ports-gnome-92e09b206af69b6d0ca7ff7043268956c269d5ec.tar.gz
freebsd-ports-gnome-92e09b206af69b6d0ca7ff7043268956c269d5ec.tar.zst
freebsd-ports-gnome-92e09b206af69b6d0ca7ff7043268956c269d5ec.zip
Fix build on 4-x
PR: ports/68349 Submitted by: maintainer
Diffstat (limited to 'emulators')
-rw-r--r--emulators/qemu-devel/Makefile1
-rw-r--r--emulators/qemu-devel/files/patch-bg7
-rw-r--r--emulators/qemu/Makefile1
-rw-r--r--emulators/qemu/files/patch-bg7
4 files changed, 12 insertions, 4 deletions
diff --git a/emulators/qemu-devel/Makefile b/emulators/qemu-devel/Makefile
index cc67f57ab826..dc1d1a75f4d5 100644
--- a/emulators/qemu-devel/Makefile
+++ b/emulators/qemu-devel/Makefile
@@ -27,6 +27,7 @@ WRKSRC= ${WRKDIR}/${DISTNAME}
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}
diff --git a/emulators/qemu-devel/files/patch-bg b/emulators/qemu-devel/files/patch-bg
index 26d0bf2833bc..5beb0f5c88bb 100644
--- a/emulators/qemu-devel/files/patch-bg
+++ b/emulators/qemu-devel/files/patch-bg
@@ -8,27 +8,30 @@ Index: qemu/qemu-mkcow.c
#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
diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile
index cc67f57ab826..dc1d1a75f4d5 100644
--- a/emulators/qemu/Makefile
+++ b/emulators/qemu/Makefile
@@ -27,6 +27,7 @@ WRKSRC= ${WRKDIR}/${DISTNAME}
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}
diff --git a/emulators/qemu/files/patch-bg b/emulators/qemu/files/patch-bg
index 26d0bf2833bc..5beb0f5c88bb 100644
--- a/emulators/qemu/files/patch-bg
+++ b/emulators/qemu/files/patch-bg
@@ -8,27 +8,30 @@ Index: qemu/qemu-mkcow.c
#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