1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
$NetBSD: patch-dh,v 1.1 2009/08/31 10:18:49 hasso Exp $
--- qemu-char.c.orig 2009-07-17 03:56:24 +0300
+++ qemu-char.c 2009-08-30 16:00:34 +0300
@@ -66,6 +66,10 @@
#include <libutil.h>
#include <dev/ppbus/ppi.h>
#include <dev/ppbus/ppbconf.h>
+#elif defined(__DragonFly__)
+#include <libutil.h>
+#include <dev/misc/ppi/ppi.h>
+#include <bus/ppbus/ppbconf.h>
#else
#include <util.h>
#endif
@@ -798,7 +802,7 @@ void cfmakeraw (struct termios *termios_
#endif
#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \
- || defined(__NetBSD__) || defined(__OpenBSD__)
+ || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
typedef struct {
int fd;
@@ -928,7 +932,7 @@ static CharDriverState *qemu_chr_open_pt
PtyCharDriver *s;
struct termios tty;
int slave_fd, len;
-#if defined(__OpenBSD__)
+#if defined(__OpenBSD__) || defined(__DragonFly__)
char pty_name[PATH_MAX];
#define q_ptsname(x) pty_name
#else
@@ -1274,7 +1278,7 @@ static CharDriverState *qemu_chr_open_pp
}
#endif /* __linux__ */
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__DragonFly__)
static int pp_ioctl(CharDriverState *chr, int cmd, void *arg)
{
int fd = (int)chr->opaque;
@@ -2162,13 +2166,13 @@ CharDriverState *qemu_chr_open(const cha
if (strstart(filename, "/dev/parport", NULL)) {
chr = qemu_chr_open_pp(filename);
} else
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
if (strstart(filename, "/dev/ppi", NULL)) {
chr = qemu_chr_open_pp(filename);
} else
#endif
#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \
- || defined(__NetBSD__) || defined(__OpenBSD__)
+ || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
if (strstart(filename, "/dev/", NULL)) {
chr = qemu_chr_open_tty(filename);
} else
|