Diff between a0347f2340065abc8bc3711d11f5667877d985cb and 40f6359e91f5495c713a183465d61672e786d87e
Changed Files
| File | Additions | Deletions | Status |
| emulator/serial.c | +2 | -1 | modified |
Full Patch
diff --git a/emulator/serial.c b/emulator/serial.c
index 9583be4..8b49dc6 100644
--- a/emulator/serial.c
+++ b/emulator/serial.c
@@ -32,6 +32,7 @@
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
+#include <fcntl.h>
#include <sys/param.h>
#include <sys/epoll.h>
#include <sys/uio.h>
@@ -160,7 +161,7 @@ static void open_pty(struct serial *serial)
{
enum btdev_type uninitialized_var(type);
- serial->fd = getpt();
+ serial->fd = posix_openpt(O_RDWR | O_NOCTTY);
if (serial->fd < 0) {
perror("Failed to get master pseudo terminal");
return;