diff options
Diffstat (limited to 'emulators/qemu-devel/files/patch-vl.c')
-rw-r--r-- | emulators/qemu-devel/files/patch-vl.c | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/emulators/qemu-devel/files/patch-vl.c b/emulators/qemu-devel/files/patch-vl.c index 44c3c64cb468..3d23a23d855e 100644 --- a/emulators/qemu-devel/files/patch-vl.c +++ b/emulators/qemu-devel/files/patch-vl.c @@ -1,21 +1,4 @@ Index: qemu/vl.c -@@ -1510,7 +1510,7 @@ - return chr; - } - --#if defined(__linux__) -+#if defined(__linux__) || defined(__FreeBSD__) - static CharDriverState *qemu_chr_open_pty(void) - { - struct termios tty; -@@ -1904,6 +1907,7 @@ - return chr; - } - -+#if defined(__linux__) - typedef struct { - int fd; - int mode; @@ -1727,6 +1728,7 @@ chr->chr_ioctl = pp_ioctl; return chr; @@ -24,3 +7,29 @@ Index: qemu/vl.c #else CharDriverState *qemu_chr_open_pty(void) +@@ -1771,14 +1771,14 @@ + return chr; + } + +-#if defined(__linux__) || defined(__sun__) ++#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) + static CharDriverState *qemu_chr_open_pty(void) + { + struct termios tty; + char slave_name[1024]; + int master_fd, slave_fd; + +-#if defined(__linux__) ++#if defined(__linux__) || defined(__FreeBSD__) + /* Not satisfying */ + if (openpty(&master_fd, &slave_fd, slave_name, NULL, NULL) < 0) { + return NULL; +@@ -3036,7 +3036,7 @@ + return qemu_chr_open_pp(filename); + } else + #endif +-#if defined(__linux__) || defined(__sun__) ++#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) + if (strstart(filename, "/dev/", NULL)) { + return qemu_chr_open_tty(filename); + } else |