summaryrefslogtreecommitdiff
path: root/emulators/qemu-devel/files/patch-vl.c
blob: 5eff6568373bd78e4006a7e675a4c0620a45f529 (plain) (blame)
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
--- vl.c.orig	Mon Nov 14 15:55:56 2005
+++ vl.c	Mon Nov 14 15:57:25 2005
@@ -40,6 +40,10 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <dirent.h>
+#ifdef __FreeBSD__
+#include <sys/types.h>
+#include <libutil.h>
+#endif
 #ifdef _BSD
 #include <sys/stat.h>
 #ifndef __APPLE__
@@ -1363,7 +1367,7 @@
     return chr;
 }
 
-#if defined(__linux__)
+#if defined(__linux__) || defined(__FreeBSD__)
 CharDriverState *qemu_chr_open_pty(void)
 {
     char slave_name[1024];
@@ -1509,6 +1513,7 @@
     return chr;
 }
 
+#if defined(__linux__)
 static int pp_ioctl(CharDriverState *chr, int cmd, void *arg)
 {
     int fd = (int)chr->opaque;
@@ -1571,6 +1576,7 @@
     chr->chr_ioctl = pp_ioctl;
     return chr;
 }
+#endif
 
 #else
 CharDriverState *qemu_chr_open_pty(void)