78 lines
1.5 KiB
Text
78 lines
1.5 KiB
Text
$NetBSD: patch-ac,v 1.1.1.1 2006/01/11 09:17:24 tnn2 Exp $
|
|
|
|
--- vl.c.orig 2005-12-20 09:21:53.000000000 +1030
|
|
+++ vl.c
|
|
@@ -34,7 +34,11 @@
|
|
#include <sys/times.h>
|
|
#include <sys/wait.h>
|
|
#include <termios.h>
|
|
+#ifdef __APPLE__
|
|
+#include "fakepoll.h"
|
|
+#else
|
|
#include <sys/poll.h>
|
|
+#endif
|
|
#include <sys/mman.h>
|
|
#include <sys/ioctl.h>
|
|
#include <sys/socket.h>
|
|
@@ -44,8 +48,10 @@
|
|
#ifdef _BSD
|
|
#include <sys/stat.h>
|
|
#ifndef __APPLE__
|
|
+#ifndef _BSD
|
|
#include <libutil.h>
|
|
#endif
|
|
+#endif
|
|
#else
|
|
#include <linux/if.h>
|
|
#include <linux/if_tun.h>
|
|
@@ -70,7 +76,7 @@
|
|
|
|
#ifdef CONFIG_SDL
|
|
#ifdef __APPLE__
|
|
-#include <SDL/SDL.h>
|
|
+#include <SDL.h>
|
|
#endif
|
|
#endif /* CONFIG_SDL */
|
|
|
|
@@ -1388,7 +1394,7 @@ CharDriverState *qemu_chr_open_stdio(voi
|
|
return chr;
|
|
}
|
|
|
|
-#if defined(__linux__)
|
|
+#if defined(__linux__) || defined(__NetBSD__)
|
|
CharDriverState *qemu_chr_open_pty(void)
|
|
{
|
|
struct termios tty;
|
|
@@ -1545,6 +1551,9 @@ CharDriverState *qemu_chr_open_tty(const
|
|
|
|
static int pp_ioctl(CharDriverState *chr, int cmd, void *arg)
|
|
{
|
|
+#ifdef __NetBSD__
|
|
+ return -ENOTSUP;
|
|
+#else
|
|
int fd = (int)chr->opaque;
|
|
uint8_t b;
|
|
|
|
@@ -1578,10 +1587,14 @@ static int pp_ioctl(CharDriverState *chr
|
|
return -ENOTSUP;
|
|
}
|
|
return 0;
|
|
+#endif
|
|
}
|
|
|
|
CharDriverState *qemu_chr_open_pp(const char *filename)
|
|
{
|
|
+#ifdef __NetBSD__
|
|
+ return NULL;
|
|
+#else
|
|
CharDriverState *chr;
|
|
int fd;
|
|
|
|
@@ -1604,6 +1617,7 @@ CharDriverState *qemu_chr_open_pp(const
|
|
chr->chr_add_read_handler = null_chr_add_read_handler;
|
|
chr->chr_ioctl = pp_ioctl;
|
|
return chr;
|
|
+#endif
|
|
}
|
|
|
|
#else
|