summaryrefslogtreecommitdiff
path: root/emulators/qemu/patches/patch-ac
blob: 4f6e49c91d9d55a121be8ce5c7aa6134ab59dd4c (plain)
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
$NetBSD: patch-ac,v 1.7 2006/08/21 17:23:52 dbj Exp $

--- vl.c.orig	2006-05-06 19:22:32.000000000 +0200
+++ vl.c	2006-05-06 19:28:25.000000000 +0200
@@ -43,7 +47,7 @@
 #include <netdb.h>
 #ifdef _BSD
 #include <sys/stat.h>
-#ifndef __APPLE__
+#ifndef _BSD
 #include <libutil.h>
 #endif
 #else
@@ -1506,7 +1510,7 @@
     return chr;
 }
 
-#if defined(__linux__)
+#if defined(__linux__) || defined(__NetBSD__)
 CharDriverState *qemu_chr_open_pty(void)
 {
     struct termios tty;
@@ -1663,6 +1667,9 @@
 
 static int pp_ioctl(CharDriverState *chr, int cmd, void *arg)
 {
+#ifdef __NetBSD__
+    return ENOTSUP;
+#else
     int fd = (int)chr->opaque;
     uint8_t b;
 
@@ -1696,10 +1703,14 @@
         return -ENOTSUP;
     }
     return 0;
+#endif
 }
 
 CharDriverState *qemu_chr_open_pp(const char *filename)
 {
+#ifdef __NetBSD__
+    return NULL;
+#else
     CharDriverState *chr;
     int fd;
 
@@ -1722,6 +1733,7 @@
     chr->chr_add_read_handler = null_chr_add_read_handler;
     chr->chr_ioctl = pp_ioctl;
     return chr;
+#endif
 }
 
 #else